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

◆ RandomDir2D()

static vector vector::RandomDir2D ( )
inlinestaticprivate

Returns randomly generated XZ unit vector with the Y(up) axis set to 0.

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

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

274 {
275 return Vector(Math.RandomFloatInclusive(-1,1),0,Math.RandomFloatInclusive(-1,1)).Normalized();
276 }
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().

Используется в SpookyEventBase::GetSoundPos() и SpawnItems().