[][src]Module boa::builtins::math

This module implements the global Math object.

Math is a built-in object that has properties and methods for mathematical constants and functions. It’s not a function object.

Math works with the Number type. It doesn't work with BigInt.

More information:

Functions

_random

Generate a random floating-point number between 0 and 1.

abs

Get the absolute value of a number.

acos

Get the arccos of a number.

acosh

Get the hyperbolic arccos of a number.

asin

Get the arcsine of a number.

asinh

Get the hyperbolic arcsine of a number.

atan

Get the arctangent of a number.

atan2

Get the arctangent of a numbers.

atanh

Get the hyperbolic arctangent of a number.

cbrt

Get the cubic root of a number.

ceil

Get lowest integer above a number.

cos

Get the cosine of a number.

cosh

Get the hyperbolic cosine of a number.

create

Create a new Math object

exp

Get the power to raise the natural logarithm to get the number.

floor

Get the highest integer below a number.

init

Initialise the Math object on the global object.

log

Get the natural logarithm of a number.

log2

Get the base 2 logarithm of the number.

log10

Get the base 10 logarithm of the number.

max

Get the maximum of several numbers.

min

Get the minimum of several numbers.

pow

Raise a number to a power.

round

Round a number to the nearest integer.

sign

Get the sign of a number.

sin

Get the sine of a number.

sinh

Get the hyperbolic sine of a number.

sqrt

Get the square root of a number.

tan

Get the tangent of a number

tanh

Get the hyperbolic tangent of a number.

trunc

Get the integer part of a number.