# Class: Mathematics

## Mathematics()

#### new Mathematics()

MaiaScript math library.

Source:
  - Math.js, line 24

### Methods

#### abs(x) → {number}

Returns the positive value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 72

##### Returns:

The positive value of x.

Type
  number

#### acos(x) → {number}

Returns the arccosine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 87

##### Returns:

The arccosine value of x.

Type
  number

#### acosh(x) → {number}

Returns the hyperbolic arccosine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 100

##### Returns:

The hyperbolic arccosine value of x.

Type
  number

#### arg(x) → {number}

Returns the complex number argument.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 112

##### Returns:

The complex number argument.

Type
  number

#### asin(x) → {number}

Returns the arcsine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 126

##### Returns:

The arcsine value of x.

Type
  number

#### asinh(x) → {number}

Returns the hyperbolic arcsine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 139

##### Returns:

The hyperbolic arcsine value of x.

Type
  number

#### atan(x) → {number}

Returns the arctangent value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 152

##### Returns:

The arctangent value of x.

Type
  number

#### atan2(x, y) → {number}

Returns the arctangent of the quotient of x and y.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.
`y` | object | Value of Y.

Source:
  - Math.js, line 166

##### Returns:

The arctangent value of x.

Type
  number

#### atanh(x) → {number}

Returns the hyperbolic arctangent value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 179

##### Returns:

The hyperbolic arctangent value of x.

Type
  number

#### cbrt(x) → {number}

Returns the cubic root of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 192

##### Returns:

The cubic root of x.

Type
  number

#### ceil(x) → {number}

Returns the value of x rounded up.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 237

##### Returns:

Value of x rounded up.

Type
  number

#### cos(x) → {number}

Returns the cosine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 205

##### Returns:

The cosine value of x.

Type
  number

#### cosh(x) → {number}

Returns the hyperbolic cosine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 221

##### Returns:

The hyperbolic cosine value of x.

Type
  number

#### deg(x) → {number}

Converts radians to decimal degrees.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 250

##### Returns:

Value of x in decimal degrees.

Type
  number

#### exp(x) → {number}

Returns the value of E^x

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 263

##### Returns:

Value of E^x.

Type
  number

#### floor(x) → {number}

Returns the value of x rounded down.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 279

##### Returns:

Value of x rounded down.

Type
  number

#### log(x) → {number}

Returns the value of the natural logarithm of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 292

##### Returns:

The value of the natural logarithm of x.

Type
  number

#### log2(x) → {number}

Returns the base 2 logarithm of a number x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 325

##### Returns:

The value of the base 10 logarithm of x.

Type
  number

#### log10(x) → {number}

Returns the base 10 logarithm of a number x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 312

##### Returns:

The value of the base 10 logarithm of x.

Type
  number

#### max(x, y) → {number}

Returns the largest value between x and y.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.
`y` | object | Value of y.

Source:
  - Math.js, line 339

##### Returns:

The largest value between x and y.

Type
  number

#### min(x, y) → {number}

Returns the smallest value between x and y.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.
`y` | object | Value of y.

Source:
  - Math.js, line 353

##### Returns:

The smallest value between x and y.

Type
  number

#### pow(x, y) → {number}

Returns the value of x to the power of y.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.
`y` | object | Value of y.

Source:
  - Math.js, line 367

##### Returns:

Value of x to the power of y.

Type
  number

#### rad(x) → {number}

Converts decimal degrees to radians.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 377

##### Returns:

Value of x in radians.

Type
  number

#### random() → {number}

Returns a random number between 0 and 1.

Source:
  - Math.js, line 389

##### Returns:

A random number.

Type
  number

#### round(x) → {number}

Returns the value of x rounding to the nearest value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 399

##### Returns:

Value of x rounding to the nearest value.

Type
  number

#### sign(x) → {number}

Returns the sign of a number, indicating whether the number is positive, negative, or zero.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 412

##### Returns:

Value of the sign of the number.

Type
  number

#### sin(x) → {number}

Returns the sine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 426

##### Returns:

The sine value of x.

Type
  number

#### sinh(x) → {number}

Returns the hyperbolic sine value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 442

##### Returns:

The hyperbolic sine value of x.

Type
  number

#### sqrt(x) → {number}

Returns the square root of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 458

##### Returns:

Value of the square root of x.

Type
  number

#### tan(x) → {number}

Returns the tangent value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 478

##### Returns:

The tangent value of x.

Type
  number

#### tanh(x) → {number}

Returns the hyperbolic tangent value of x.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 494

##### Returns:

The hyperbolic tangent value of x.

Type
  number

#### trunc(x) → {number}

Returns the integer part of a number.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | object | Value of X.

Source:
  - Math.js, line 510

##### Returns:

The integer part of a number

Type
  number

#### (inner) init()

Creates the attributes of the class.

Source:
  - Math.js, line 39