# 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 88

##### 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 102

##### 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 115

##### 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 130

##### 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 144

##### 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 158

##### 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 173

##### 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 187

##### 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 201

##### 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 249

##### 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 215

##### 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 232

##### 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 263

##### 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 277

##### 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 294

##### 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 308

##### Returns:

The value of the natural 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 330

##### 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 345

##### 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 360

##### 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 371

##### Returns:

Value of x in radians.

Type
  number

#### random() → {number}

Returns a random number between 0 and 1.

Source:
  - Math.js, line 384

##### 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 395

##### Returns:

Value of x rounding to the nearest value.

Type
  number

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

Returns the sine value of x.

##### Parameters:

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

Source:
  - Math.js, line 409

##### 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 426

##### 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 443

##### 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 464

##### 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 481

##### 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 498

##### Returns:

The integer part of a number

Type
  number

#### (inner) init()

Creates the attributes of the class.

Source:
  - Math.js, line 39