|
static proto float | Round (float f) |
| Returns value f rounded to the closest whole number.
|
|
static proto float | Floor (float f) |
| Returns value f rounded down to the closest whole number.
|
|
static proto float | Ceil (float f) |
| Returns value f rounded up to the closest whole number.
|
|
static proto float | Min (float x, float y) |
| Returns lower of two values x and y .
|
|
static proto float | Max (float x, float y) |
| Returns larger of two values x and y .
|
|
static proto float | Sin (float angleRad) |
| Returns sine of an angle specified in radians.
|
|
static proto float | Cos (float angleRad) |
| Returns cosine of an angle specified in radians.
|
|
static proto float | Tan (float angleRad) |
| Returns tangent of an angle specified in radians.
|
|
static proto float | Asin (float s) |
| Returns angle in radians from sine.
|
|
static proto float | Acos (float c) |
| Returns angle in radians from cosine.
|
|
static proto float | Atan2 (float y, float x) |
| Returns angle in radians from tangent.
|
|
static proto float | Pow (float v, float power) |
| Returns v raised to the power .
|
|
static proto float | Mod (float v, float div) |
| Returns remainder of division v/div .
|
|
static proto float | AbsFloat (float f) |
| Returns absolute value of f .
|
|
static proto int | AbsInt (int i) |
| Returns absolute value of i .
|
|
static proto float | Sqrt (float val) |
| Returns square root of val .
|
|
static proto float | Log2 (float x) |
| Returns the binary (base-2 ) logarithm of x .
|
|
static proto float | Log10 (float x) |
| Returns the common (base-10 ) logarithm of x .
|
|
static proto float | Log (float x) |
| Returns the natural (base-e ) logarithm of x .
|
|
static proto float | 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 proto float | SmoothCDPI2PI (float val, float target, inout float velocity, float smoothTime, float maxVelocity, float dt) |
| SmoothCD() version that wraps around on [-PI,PI] range.
|
|
static proto float | SmoothSpring (float val, float target, inout float velocity, float spring, float damping, float dt) |
| Does spring smoothing function.
|
|
static proto float | PerlinNoise (float x, float y=0, float z=0) |
| Returns value (between -1 and 1) of Perlin noise for given parameters x, y, z To get 1D or 2D noise simply leave the respective parameters to 0 (y and z or just z)
|
|
static proto float | PerlinNoise01 (float x, float y=0, float z=0) |
| PerlinNoise() but normalized to (0, 1).
|
|
static proto float | SimplexNoise1D (float x) |
| Returns value (between -1 and 1) of Simplex noise for given input x .
|
|
static proto int | RandomInt (int min, int max) |
| Returns a random int number between min [inclusive] and max [exclusive].
|
|
static proto int | Randomize (int seed) |
| Sets the seed for the random number generator.
|
|
static proto float | RandomFloat (float min, float max) |
| Returns a random float number between min [inclusive] and max [exclusive].
|
|
static proto float | RandomGaussFloat (float sigma, float mean) |
| Returns random number with Gauss distribution (http://en.wikipedia.org/wiki/File:Normal_Distribution_PDF.svg)
|
|
static proto int | RandomIntInclusive (int min, int max) |
| Returns a random int number between min [inclusive] and max [inclusive].
|
|
static proto float | RandomFloatInclusive (float min, float max) |
| Returns a random float number between min [inclusive] and max [inclusive].
|
|
static proto float | RandomFloat01 () |
| Returns a random float number in range [0.0, 1.0] inclusive on both ends.
|
|
static proto float | Repeat (float value, float range) |
| Loop the value in given range (similar to modulo).
|
|
static proto float | Map (float value, float fromLow, float fromHigh, float toLow, float toHigh) |
| Re-maps a number from one range to another.
|
|
static proto float | MapAngle (float value, float fFromRange=360, float fToLow=-180, float fToHigh=180) |
| Re-maps angle from one range to another.
|
|
static proto bool | IsInRange (float value, float min, float max) |
| Returns true when value is greater than or equal to min and less than or equal to max .
|
|
static proto bool | IsInRangeSharp (float value, float min, float max) |
| Returns true when value is greater than min and less than max .
|
|
static proto float | Clamp (float value, float min, float max) |
| Clamps value to range specified by [min, max] .
|
|
static proto int | ClampInt (int value, int min, int max) |
| Clamps value to range specified by [min, max] .
|
|
static proto float | Lerp (float a, float b, float t) |
| Does linear interpolation between a and b using t .
|
|
static proto float | InverseLerp (float a, float b, float value) |
| Calculates the interpolation parameter that produces the value by interpolating from a to b .
|
|