Math
The Math class provides static properties and functions useful in arithmetic.
print Math's square_root 4 # 2Note: constants referenced from Go's math package, which references the OEIS.
Static Properties
A value of 3.14159265358979323846264338327950288419716939937510582097494459
A value of Math's pi * 2
A value of 2.71828182845904523536028747135266249775724709369995957496696763
A value of 1.61803398874989484820458683436563811772030917980576286213544862
A value of 9223372036854775807
A value of -9223372036854775808
Static Functions
Returns the sign of a value, -1 if negative, 0 if zero, and 1 if positive.
let value be -3
let sign be Math's sign value
if sign is equal to 0 then
print "{value} is zero"
otherwise if sign is equal to 1 then
print "{value} is positive"
otherwise
print "{value} is negative"Returns the square root of a value.
Returns the natural logarithm of a value.
Returns the exponential of a value.
Trigonometric Functions
Converts degrees to radians.
Converts radians to degrees.
Normalizes an angle in radians to the range [0, 2π).
Calculates the sine of an angle in radians.
Calculates the cosine of an angle in radians.
Calculates the tangent of an angle in radians.
Calculates the arc sine of a value.
Calculates the arc cosine of a value.
Calculates the arc tangent of a value.
print "hello world"