Skip to content

Latest commit

 

History

History
128 lines (85 loc) · 1.9 KB

File metadata and controls

128 lines (85 loc) · 1.9 KB

Math

Extended trigonometric and arithmetic functions not available in stock GSC.

Functions


fmod(<x>, <y>)

Returns the floating-point remainder of x / y.

Parameter Type Description
x float Dividend
y float Divisor
r = fmod(9, 2); // 1

sin1(<x>)

Returns the sine of x radians.

Parameter Type Description
x float Angle in radians
s = sin1(0.4);

asin1(<x>)

Returns the arc sine of x in radians.

Parameter Type Description
x float Value in the range [-1, 1]
a = asin1(0.4);

cos1(<x>)

Returns the cosine of x radians.

Parameter Type Description
x float Angle in radians
c = cos1(0.4);

acos1(<x>)

Returns the arc cosine of x in radians.

Parameter Type Description
x float Value in the range [-1, 1]
a = acos1(0.4);

tan1(<x>)

Returns the tangent of x radians.

Parameter Type Description
x float Angle in radians
t = tan1(0.4);

atan1(<x>)

Returns the arc tangent of x in radians.

Parameter Type Description
x float Input value
a = atan1(0.4);

atan2(<y>, <x>)

Returns the arc tangent of y / x in radians, using the signs of both arguments to determine the correct quadrant.

Parameter Type Description
y float Numerator
x float Denominator
a = atan2(9, 2);