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

Структуры данных

class  Math
 

Функции

void Math::Math ()
 
void Math::~Math ()
 
static proto int Math::GetNumberOfSetBits (int i)
 returns the number of bits set in a bitmask i
 
static proto int Math::GetNthBitSet (int value, int n)
 returns the the index of n-th bit set in a bit mask counting from the right, for instance, in a mask ..0110 1000 , the 0th set bit(right-most bit set to 1) is at 3th position(starting at 0), 1st bit is at 5th position, 2nd bit is at 6th position etc..
 
static proto int Math::RandomInt (int min, int max)
 Returns a random int number between and min [inclusive] and max [exclusive].
 
static int Math::RandomIntInclusive (int min, int max)
 Returns a random int number between and min [inclusive] and max [inclusive].
 
static bool Math::RandomBool ()
 Returns a random bool .
 
static proto float Math::RandomFloat (float min, float max)
 Returns a random float number between and min[inclusive] and max[exclusive].
 
static float Math::RandomFloatInclusive (float min, float max)
 Returns a random float number between and min [inclusive] and max [inclusive].
 
static float Math::RandomFloat01 ()
 Returns a random float number between and min [inclusive] and max [inclusive].
 
static proto int Math::Randomize (int seed)
 Sets the seed for the random number generator.
 
static proto float Math::NormalizeAngle (float ang)
 Normalizes the angle (0...360)
 
static proto float Math::DiffAngle (float angle1, float angle2)
 Return relative difference between angles.
 
static proto float Math::Pow (float v, float power)
 Return power of v ^ power.
 
static proto float Math::ModFloat (float x, float y)
 Returns the floating-point remainder of x/y rounded towards zero.
 
static proto float Math::RemainderFloat (float x, float y)
 Returns the floating-point remainder of x/y rounded to nearest.
 
static proto float Math::AbsFloat (float f)
 Returns absolute value.
 
static proto int Math::AbsInt (int i)
 Returns absolute value.
 
static proto float Math::SignFloat (float f)
 Returns sign of given value.
 
static proto int Math::SignInt (int i)
 Returns sign of given value.
 
static proto float Math::SqrFloat (float f)
 Returns squared value.
 
static proto int Math::SqrInt (int i)
 Returns squared value.
 
static proto float Math::Sqrt (float val)
 Returns square root.
 
static proto float Math::Log2 (float x)
 Returns the binary (base-2) logarithm of x.
 
static proto float Math::Sin (float angle)
 Returns sinus of angle in radians.
 
static proto float Math::Cos (float angle)
 Returns cosinus of angle in radians.
 
static proto float Math::Tan (float angle)
 Returns tangent of angle in radians.
 
static proto float Math::Asin (float s)
 Returns angle in radians from sinus.
 
static proto float Math::Acos (float c)
 Returns angle in radians from cosinus.
 
static proto float Math::Atan (float x)
 Returns angle in radians from tangent.
 
static proto float Math::Atan2 (float y, float x)
 Returns angle in radians from tangent.
 
static proto float Math::Round (float f)
 Returns mathematical round of value.
 
static proto float Math::Floor (float f)
 Returns floor of value.
 
static proto float Math::Ceil (float f)
 Returns ceil of value.
 
static proto float Math::WrapFloat (float f, float min, float max)
 Returns wrap number to specified interval [min, max[.
 
static proto float Math::WrapFloatInclusive (float f, float min, float max)
 Returns wrap number to specified interval, inclusive [min, max].
 
static proto float Math::WrapFloat0X (float f, float max)
 Returns wrap number to specified interval [0, max[.
 
static proto float Math::WrapFloat0XInclusive (float f, float max)
 Returns wrap number to specified interval, inclusive [0, max].
 
static proto int Math::WrapInt (int i, int min, int max)
 Returns wrap number to specified interval [min, max[.
 
static proto int Math::WrapInt0X (int i, int max)
 Returns wrap number to specified interval [0, max[.
 
static proto float Math::Clamp (float value, float min, float max)
 Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
 
static proto float Math::Min (float x, float y)
 Returns smaller of two given values.
 
static proto float Math::Max (float x, float y)
 Returns bigger of two given values.
 
static proto bool Math::IsInRange (float v, float min, float max)
 Returns if value is between min and max (inclusive)
 
static proto bool Math::IsInRangeInt (int v, int min, int max)
 Returns if value is between min and max (inclusive)
 
static proto float Math::Lerp (float a, float b, float time)
 Linearly interpolates between 'a' and 'b' given 'time'.
 
static proto float Math::InverseLerp (float a, float b, float value)
 Calculates the linear value that produces the interpolant value within the range [a, b], it's an inverse of Lerp.
 
static proto float Math::AreaOfRightTriangle (float s, float a)
 Returns area of a right triangle.
 
static proto float Math::HypotenuseOfRightTriangle (float s, float a)
 Returns hypotenus of a right triangle.
 
static proto bool Math::IsPointInCircle (vector c, float r, vector p)
 Returns if point is inside circle.
 
static proto bool Math::IsPointInRectangle (vector mi, vector ma, vector p)
 Returns if point is inside rectangle.
 
static proto float Math::SmoothCD (float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
 Does the CD smoothing function - easy in | easy out / S shaped smoothing.
 
static float Math::SmoothCDPI2PI (float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
 
static float Math::Poisson (float mean, int occurences)
 occurences values above '12' will cause Factorial to overflow int.
 
static int Math::Factorial (int val)
 values above '12' will cause int overflow
 
static float Math::Remap (float inputMin, float inputMax, float outputMin, float outputMax, float inputValue, bool clampedOutput=true)
 Returns given value remaped from input range into output range.
 
static vector Math::CenterOfRectangle (vector min, vector max)
 

Переменные

static const float Math::EULER = 2.7182818284590452353
 
static const float Math::PI = 3.14159265358979
 
static const float Math::PI2 = 6.28318530717958
 
static const float Math::PI_HALF = 1.570796326794
 
static const float Math::RAD2DEG = 57.2957795130823208768
 
static const float Math::DEG2RAD = 0.01745329251994329577
 

Подробное описание