Skip to content

Math and Numbers

Math and Numbers

abs(number number) : number

atan(number number) : number

ceil(number number) : number

cos(number number) : number

floor(number number) : number

is_numeric(any value) : bool

Returns true if value is numeric.

Examples:

  • 12345 returns true.
  • "1.0" returns true.
  • null returns false.

max(array numbers) : number

min(array numbers) : number

mod(number number, number divisor) : number

Returns the remainder after number is divided by divisor.

number_length(number number) : number

num2hex(number number) : string

hex2num(string hex_string) : number

hex2bin(string hex_string) : ?string

pi() : number

Returns the value of Pi.

pow(number number, number power) : number

rand(number min, number max) : number

Returns a random number between min and max.

round(number number, number precision) : number

sin(number number) : number

sqrt(number number) : number

tan(number number) : number

to_number(any value) : number