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

◆ RandomDir()

static vector vector::RandomDir ( )
inlinestaticprivate

Returns randomly generated unit vector.

Возвращает
randomly generated unit vector
Print(vec);
Print(vec.Length());
>> <-0.179424,0.966825,0.181816>
>> 1
static vector RandomDir()
Returns randomly generated unit vector.
Определения EnConvert.c:243
proto native float Length()
Returns length of vector (magnitude)
Определения EnConvert.c:106
proto void Print(void var)
Prints content of variable to console/log.

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

244 {
245 return Vector(Math.RandomFloatInclusive(-1,1),Math.RandomFloatInclusive(-1,1),Math.RandomFloatInclusive(-1,1)).Normalized();
246 }
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки Normalized(), Math::RandomFloatInclusive() и Vector().