Maths
Written by: Alian713, Kramb
1. abs¶
Returning Type: float
Prototype: float abs(float x)
Parameters:
float x: The number to find the absolute value of
Returns the absolute value (magnitude) of the given number.
2. sqrt¶
Returning Type: float
Prototype: float sqrt(float x)
Parameters:
float x: The number to find the square root of
Returns the square root of the given number.
3. pow¶
Returning Type: float
Prototype: float pow(float x, float y)
Parameters:
float x: The base valuefloat y: The exponent to raise the base value to
Returns x raised to the power y (x**y).
4. sin¶
Returning Type: float
Prototype: float sin(float x)
Parameters:
float x: The angle (in radians) to find the sine of
Returns the sine of the angle in radians.
5. cos¶
Returning Type: float
Prototype: float cos(float x)
Parameters:
float x: The angle (in radians) to find the cosine of
Returns the cosine of the angle in radians
6. tan¶
Returning Type: float
Prototype: float tan(float x)
Parameters:
float x: The angle (in radians) to find the tangent of
Returns the tangent of the angle in radians
7. asin¶
Returning Type: float
Prototype: float asin(float x)
Parameters:
float x: The value to find the inverse sine of
Returns the inverse sine (arcsin) of the given value
8. acos¶
Returning Type: float
Prototype: float acos(float x)
Parameters:
float x: The value to find the inverse cosine of
Returns the inverse cosine (arccos) of the given value
9. atan¶
Returning Type: float
Prototype: float atan(float x)
Parameters:
float x: The value to find the inverse tangent of
Returns the inverse tangent (arctan) of the given value
10. atan2¶
Returning Type: float
Prototype: float atan2(float y, float x)
Parameters:
float y: The Y coordinate of the point to find the X+ angle offloat x: The X coordinate of the point to find the X+ angle of
Returns the angle of the given point (x, y) made from the X+ axis, in the range \([-\pi, \pi]\)
11. atan2v¶
Returning Type: float
Prototype: float atan2v(vector v)
Parameters:
vector v: The vector to get the atan2 from
Returns the angle of the given vector from the X+ axis, in the range \([-\pi, \pi]\). Ignores the Z component
12. exp¶
Returning Type: float
Prototype: float exp(float x)
Parameters:
float x: The value to find the exp of
Returns \(e^x\)
13. ceil¶
Returning Type: float
Prototype: float ceil(float x)
Parameters:
float x: The value to find the ceil of
Returns \(\left \lceil{x}\right \rceil\)
14. floor¶
Returning Type: float
Prototype: float floor(float x)
Parameters:
float x: The value to find the floor of
Returns \(\left \lfloor{x}\right \rfloor\)
15. bitCastToFloat¶
Returning Type: float
Prototype: float bitCastToFloat(int number)
Parameters:
int number: The value toreinterpret/bit_casttofloat
Reinterprets/Bit casts the given int value to float. Equivalent to std::mem::transmute::<i32, f32>(number)
16. bitCastToInt¶
Returning Type: int
Prototype: int bitCastToInt(float number)
Parameters:
float number: The value toreinterpret/bit_casttoint
Reinterprets/Bit casts the given float value to int. Equivalent to std::mem::transmute::<f32, i32>(number)
17. xsCeilToInt¶
Returning Type: int
Prototype: int xsCeilToInt(float value)
Parameters:
float value: The value to determine the ceil of
Rounds the number up to the next integer