Skip to content
Pharap edited this page Jun 30, 2019 · 8 revisions

Summary

Mathematics (from Greek μάθημα máthēma, "knowledge, study, learning") includes the study of such topics as quantity, structure, space, and change.


  • float PI

Return a precise enough value of PI as float

  • Type max( Type a, Type b )

Return the maximum value, Type can be one of: int, float, long, double

  • Type min( Type a, Type b )

Return the minimum value, Type can be one of: int, float, long, double

  • Type abs( Type a )

Return the absolute value, Type can be one of: int, float, long, double

  • float floor( float a )

Return the largest integer less than or equal to a

  • float round( float a )

Return the value of a rounded to the nearest integer

  • float ceil( float a )

Return the smallest integer greater than or equal to a

  • float random()

Return a random float that is greater than or equal to 0 and less than 1 In other words, returns a value x such that x >= 0 && x < 1

  • int random( int min, int max )

Return a random int that is greater than or equal to min and less than max In other words, returns a value x such that x >= min && x < max

  • float cos( float angle )

Return the cosine of the angle expressed in radians (example)

  • float sin( float angle )

Return the sine of the angle expressed in radians (example)

  • float atan2( float fy, float fx )

Returns the arctangent of the quotient of its arguments, as a numeric value between PI and -PI radians. The number returned represents the counterclockwise angle in radians between the positive X axis and the point (x, y).

  • float sqrt( float x )

Return the square root of the float value passed

Clone this wiki locally