Numbers & Text > Trig / Exponents

Conversion Converts the given number to degrees or radians.

Utils.DEG * [NUMBER]

Constants

Pi Returns the value of Pi (3.14159...).

Math.PI

e Returns e, the base of natural logarithms. (2.718...)

2.71828

Trig Functions

Sin / Cos / Tan Returns the result of applying a trigonometric function to the given number. Dropdown for degrees/radians specifies what format the incoming number is in. Supports sin/cos/tan/asin/acos/atan.

//Incoming number is Degrees

Math.sin([NUMBER])

//Other operations
Math.cos([NUMBER])
Math.tan([NUMBER])
Math.asin([NUMBER])
Math.acos([NUMBER])
Math.atan([NUMBER])

Inverse Tangent Converts from rectangular to polar coordinates. The return value is in radians.

Math.atan2([NUMBER], [NUMBER])

Example: Point Actor Towards Mouse Using inverse tangent, we can calculate the angle to rotate the actor to based on the mouse's position.

Exponents

Square Root Returns the square root of the given number.

Math.sqrt([NUMBER])

Power Returns the given number to the specified power (e.g., xy).

Math.pow([NUMBER], [NUMBER])

Natural Logarithm / e Raised to a Power ln - Returns the natural logarithm of the given number.
e^ - Returns the number e to the given power.

Math.log([NUMBER])
Math.exp([NUMBER])