DayZ 1.27
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: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 строка 260

261 {
262 return Vector(Math.RandomFloatInclusive(-1,1),0,Math.RandomFloatInclusive(-1,1)).Normalized();
263 }
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() и ContaminatedArea_Dynamic::SpawnItems().