Skip to content

Built-in functions - Math

Note

Functions that enable math operations.

hsMathCos(float)

float hsMathCos(float radian) Find the cosine.

hsMathSin(float)

float hsMathSin(float radian) Find the sine.

hsMathTan(float)

float hsMathTan(float radian) Find the tangent.

hsMathAcos(float)

float hsMathAcos(float radian) Calculates the arc cosine (inverse cosine).

hsMathAsin(float)

float hsMathAsin(float radian) Calculates the arc sine (inverse sine).

hsMathAtan2(float, float)

float hsMathAtan2(float y, float x) Find the arc tangent of y / x.

hsMathSqrt(float)

float hsMathSqrt(float f) Find the square root.

hsMathRandom(int)

int hsMathRandom(int n) Find a random number between 0 and less than n.

hsMathDegToRad(float)

float hsMathDegToRad(float degree) Converts degrees to radians.

hsMathRadToDeg(float)

float hsMathRadToDeg(float radian) Converts radians to degrees.