(Created page with " =Static Public Member Functions= {{ScriptFunction|static float|Random|();|description|5=<pre></pre>|6=<pre></pre>}} {{ScriptFunction|static float|RandomRange|(float min, fl...") |
|||
Line 2: | Line 2: | ||
=Static Public Member Functions= | =Static Public Member Functions= | ||
− | {{ScriptFunction|static float|Random|();| | + | {{ScriptFunction|static float|Random|();|Returns a random value from 0 to 1 (inclusive)|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|RandomRange|(float min, float max);| | + | {{ScriptFunction|static float|RandomRange|(float min, float max);|Returns a value between min and max, inclusive, randomly.|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|RandomInteger|(int min, int max);| | + | {{ScriptFunction|static int|RandomInteger|(int min, int max);|Returns a value between min (inclusive) and max (exclusive).|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Abs|(float v);| | + | {{ScriptFunction|static float|Abs|(float v);|Returns the absolute number (i.e. always positive) of the input value.|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|Abs|(int v);| | + | {{ScriptFunction|static int|Abs|(int v);|Returns the absolute number (i.e. always positive) of the input value.|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Acos|(float v);| | + | {{ScriptFunction|static float|Acos|(float v);|Returns the arc cosine of the input value|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static bool|Approximately|(float a, float b);| | + | {{ScriptFunction|static bool|Approximately|(float a, float b);|Returns true if the values approximately are equal. Due to the nature of floating point values on modern computers, it is often possible to get two values that should match, which are very close, but not exactly the same.|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Asin|(float v);| | + | {{ScriptFunction|static float|Asin|(float v);|Returns the arc sine value of 'v'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Atan|(float v);| | + | {{ScriptFunction|static float|Atan|(float v);|Returns the arc tangent value of 'v'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Atan2|(float y, float x);| | + | {{ScriptFunction|static float|Atan2|(float y, float x);|Returns the arc tangent of y/x|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|Ceil|(float v);| | + | {{ScriptFunction|static int|Ceil|(float v);|Returns the ceil value of 'val' as an integer|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Clamp|(float v, float min, float max);| | + | {{ScriptFunction|static float|Clamp|(float v, float min, float max);|Clamps val between min and max, and returns the result|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Clamp01|(float v);| | + | {{ScriptFunction|static float|Clamp01|(float v);|Clamps val between 0 and 1, and returns the result|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|ClosestPowerOfTwo|(int v);| | + | {{ScriptFunction|static int|ClosestPowerOfTwo|(int v);|Returns the closest power of two to val|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Cos|(float v);| | + | {{ScriptFunction|static float|Cos|(float v);|Returns the cosine of val|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|DeltaAngle|(float current, float target);| | + | {{ScriptFunction|static float|DeltaAngle|(float current, float target);|Returns the difference in degrees between two values (e.g. 350' and 17' returns 27')|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Exp|(float v);| | + | {{ScriptFunction|static float|Exp|(float v);|Returns e raised to v power.|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|Floor|(float v);| | + | {{ScriptFunction|static int|Floor|(float v);|Returns floor of val, converted to an int|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|GammaToLinearSpace|(float v);| | + | {{ScriptFunction|static float|GammaToLinearSpace|(float v);|Converts a colour value from Gamma to Linear Space (Pow 2.2)|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|InverseLerp|(float a, float b, float value);| | + | {{ScriptFunction|static float|InverseLerp|(float a, float b, float value);|Returns the percentage between a and b that 'val' is on a line (opposite of Lerp)|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static bool|IsPowerOfTwo|(int v);| | + | {{ScriptFunction|static bool|IsPowerOfTwo|(int v);|Returns true if val is a power of two|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Lerp|(float a, float b, float v);| | + | {{ScriptFunction|static float|Lerp|(float a, float b, float v);|Interpolates between 'a' and 'b' based on 'val', assuming 'val' is between 0 and 1|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|LerpAngle|(float a, float b, float v);| | + | {{ScriptFunction|static float|LerpAngle|(float a, float b, float v);|Interpolates between angles 'a' and 'b' based on 'val', assuming 'val' is between 0 and 1|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|LerpUnclamped|(float a, float b, float v);| | + | {{ScriptFunction|static float|LerpUnclamped|(float a, float b, float v);|Interpolates between 'a' and 'b' based on 'val', assuming 'val' is between 0 and 1, but unbounded (allowing higher/lower values)|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|LinearToGammaSpace|(float v);| | + | {{ScriptFunction|static float|LinearToGammaSpace|(float v);|Converts a colour value from Linear to Gamma Space (Pow 1/2.2)|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Log|(float v);| | + | {{ScriptFunction|static float|Log|(float v);|Returns the natural logarithm for 'v'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Log|(float v, float p);| | + | {{ScriptFunction|static float|Log|(float v, float p);|Returns the logarithm of 'p' for 'v'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Log10|(float v);| | + | {{ScriptFunction|static float|Log10|(float v);|Returns the Log10 value for 'v'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Max|(float a, float b);| | + | {{ScriptFunction|static float|Max|(float a, float b);|Returns higher of 'a' or 'b'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Min|(float a, float b);| | + | {{ScriptFunction|static float|Min|(float a, float b);|Returns lower of 'a' or 'b'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|MoveTowards|(float value, float target, float delta);| | + | {{ScriptFunction|static float|MoveTowards|(float value, float target, float delta);|Move value to target, but by no more than delta|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|MoveTowardsAngle|(float value, float target, float delta);| | + | {{ScriptFunction|static float|MoveTowardsAngle|(float value, float target, float delta);|Move angle value to target, but by no more than delta|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|NextPowerOfTwo|(int v);| | + | {{ScriptFunction|static int|NextPowerOfTwo|(int v);|Return the next power of two larger or equal to val|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|PerlinNoise|(float x, float y);| | + | {{ScriptFunction|static float|PerlinNoise|(float x, float y);|Return 2D Perlin noise for coordinates x and y|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|PingPong|(float t, float length);| | + | {{ScriptFunction|static float|PingPong|(float t, float length);|Return a value between 0 and length that oscillates upwards and back based on the position of 'val'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Pow|(float value, float pow);| | + | {{ScriptFunction|static float|Pow|(float value, float pow);|Return x raised to y power|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Repeat|(float value, float length);| | + | {{ScriptFunction|static float|Repeat|(float value, float length);|Return a value between 0 and length that returns to 0 after exceeding length based on 'val'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static int|Round|(float value);| | + | {{ScriptFunction|static int|Round|(float value);|Returns the nearest integer value to val|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Sign|(float value);| | + | {{ScriptFunction|static float|Sign|(float value);|Returns either 1 or -1 based on the sign of 'v'|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Sin|(float value);| | + | {{ScriptFunction|static float|Sin|(float value);|Returns the sine of val|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|SmoothStep|(float edge0, float edge1, float x);| | + | {{ScriptFunction|static float|SmoothStep|(float edge0, float edge1, float x);|Similar to Lerp but moves slowly closer to the edges ('Spherical Lerp')|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Sqrt|(float value);| | + | {{ScriptFunction|static float|Sqrt|(float value);|Returns the square root of val|5=<pre></pre>|6=<pre></pre>}} |
− | {{ScriptFunction|static float|Tan|(float value);| | + | {{ScriptFunction|static float|Tan|(float value);|Returns the tangent value of 'val'|5=<pre></pre>|6=<pre></pre>}} |
=Static Public Attributes= | =Static Public Attributes= | ||
− | {{ScriptFunction|static readonly float|Pi|{ }| | + | {{ScriptFunction|static readonly float|Pi|{ }|Returns the value of "Pi" which is 3.14159265358979 |5=<pre></pre>|6=<pre></pre>}} |
{{Scripting Navbox}} | {{Scripting Navbox}} |
Returns a random value from 0 to 1 (inclusive)
Returns a value between min and max, inclusive, randomly.
Returns a value between min (inclusive) and max (exclusive).
Returns the absolute number (i.e. always positive) of the input value.
Returns the absolute number (i.e. always positive) of the input value.
Returns the arc cosine of the input value
Returns true if the values approximately are equal. Due to the nature of floating point values on modern computers, it is often possible to get two values that should match, which are very close, but not exactly the same.
Returns the arc sine value of 'v'
Returns the arc tangent value of 'v'
Returns the arc tangent of y/x
Returns the ceil value of 'val' as an integer
Clamps val between min and max, and returns the result
Clamps val between 0 and 1, and returns the result
Returns the closest power of two to val
Returns the cosine of val
Returns the difference in degrees between two values (e.g. 350' and 17' returns 27')
Returns e raised to v power.
Returns floor of val, converted to an int
Converts a colour value from Gamma to Linear Space (Pow 2.2)
Returns the percentage between a and b that 'val' is on a line (opposite of Lerp)
Returns true if val is a power of two
Interpolates between 'a' and 'b' based on 'val', assuming 'val' is between 0 and 1
Interpolates between angles 'a' and 'b' based on 'val', assuming 'val' is between 0 and 1
Interpolates between 'a' and 'b' based on 'val', assuming 'val' is between 0 and 1, but unbounded (allowing higher/lower values)
Converts a colour value from Linear to Gamma Space (Pow 1/2.2)
Returns the natural logarithm for 'v'
Returns the logarithm of 'p' for 'v'
Returns the Log10 value for 'v'
Returns higher of 'a' or 'b'
Returns lower of 'a' or 'b'
Move value to target, but by no more than delta
Move angle value to target, but by no more than delta
Return the next power of two larger or equal to val
Return 2D Perlin noise for coordinates x and y
Return a value between 0 and length that oscillates upwards and back based on the position of 'val'
Return x raised to y power
Return a value between 0 and length that returns to 0 after exceeding length based on 'val'
Returns the nearest integer value to val
Returns either 1 or -1 based on the sign of 'v'
Returns the sine of val
Similar to Lerp but moves slowly closer to the edges ('Spherical Lerp')
Returns the square root of val
Returns the tangent value of 'val'
Returns the value of "Pi" which is 3.14159265358979
|