DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetRandomizedPosition()

static vector GetRandomizedPosition ( vector targetPos,
float radius )
staticprotected

См. определение в файле MiscGameplayFunctions.c строка 1062

1063 {
1064 int angle = Math.RandomIntInclusive(1,360);
1065 float usedRadius = Math.RandomFloat01() * radius;
1066 vector randomPos = Vector(targetPos[0] + (Math.Cos(angle) * usedRadius), targetPos[1], targetPos[2] + (Math.Sin(angle) * usedRadius));
1067
1068 return randomPos;
1069 }
Определения EnMath.c:7
Определения EnConvert.c:106
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:126
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Определения EnMath.c:54

Перекрестные ссылки Math::Cos(), Math::RandomFloat01(), Math::RandomIntInclusive(), Math::Sin() и Vector().

Используется в GetRandomizedPositionVerified().