# Operators

Provides functional forms of operators. Useful for having a common base.

## Methods

#### classpublic Operators.Sign(`number n`)

Returns `number`

• required `n`: The number to check the sign of.

Returns the sign of a number as a signed number.

Positive numbers result in `1`

Negative numbers result in `-1`

Zero results in `0`

#### classpublic Operators.Add(`any a, any b`)

Returns

• required `a`: The first value to add.
• required `b`: The second value to add.

Adds two objects together. `a + b`

#### classpublic Operators.AddN(`...`)

Returns

• required `...`: Values to add.

Adds any number of objects together. `a + b + c + d + ...`

#### classpublic Operators.Subtract(`any a, any b`)

Returns

• required `a`: The value to subtract from.
• required `b`: The value to subtract.

Subtracts an object from another. `a - b`

#### classpublic Operators.SubtractN(`...`)

Returns

• required `...`: The values to use in a subtraction expression.

Subtracts a series of objects from eachother. `a - b - c - d - ...`

#### classpublic Operators.Multiply(`any a, any b`)

Returns

• required `a`: The first value to multiply.
• required `b`: The second value to multiply.

Multiplies two objects together. `a * b`

#### classpublic Operators.MultiplyN(`...`)

Returns

• required `...`: The values to multiply together.

Multiples a series of objects together. `a * b * c * d * ...`

#### classpublic Operators.Divide(`any a, any b`)

Returns

• required `a`: The dividend.
• required `b`: The divisor.

Performs division between two objects. `a / b`

#### classpublic Operators.DivideN(`...`)

Returns

• required `...`: A list of objects to use in a chain division.

Divides a series of objects from the left. `a / b / c / d / ...`

#### classpublic Operators.Power(`any a, any b`)

Returns

• required `a`: The base.
• required `b`: The exponent.

Performs exponentiation with two numbers. `a ^ b`

#### classpublic Operators.PowerN(`...`)

Returns

• required `...`: The values to use in a chained exponentiation expression.

Raises values to powers given by a list in a left-associative way. `((((a ^ b) ^ c) ^ d) ^ ...)`

#### classpublic Operators.Concat(`any a, any b`)

Returns

• required `a`: The first value to concat.
• required `b`: The second value to concat.

Performs concatenation with two objects. `a .. b`

#### classpublic Operators.ConcatN(`...`)

Returns

• required `...`: The values to concat.

Performs concatenation with a list of objects. `a .. b .. c .. d .. ...`

#### classpublic Operators.Equal(`any a, any b`)

Returns `bool`

• required `a`: The first value.
• required `b`: The second value.

Returns whether two values are equal. Uses the `__eq` metamethod.

#### classpublic Operators.GreaterThan(`any a, any b`)

Returns `bool`

• required `a`: The first value.
• required `b`: The second value.

Returns whether a is greater than b. Uses the `le` metamethod if available, otherwise uses `lt` and `__eq`.

#### classpublic Operators.GreaterThanEqualTo(`any a, any b`)

Returns `bool`

• required `a`: The first value.
• required `b`: The second value.

Returns whether a is greater than or equal to b. Uses the `lt` and `eq` metamethods.

#### classpublic Operators.LessThan(`any a, any b`)

Returns `bool`

• required `a`: The first value.
• required `b`: The second value.

Returns whether a is less than b. Uses the `__lt` metamethod.

#### classpublic Operators.LessThanEqualTo(`any a, any b`)

Returns `bool`

• required `a`: The first value.
• required `b`: The second value.

Returns whether a is less than or equal to b. Uses the `le` metamethod if available, otherwise uses `lt` and `__eq`.

#### classpublic Operators.NotEqual(`any a, any b`)

Returns `bool`

• required `a`: The first value.
• required `b`: the second value.

Returns whether two values are not equal. Uses the `__eq` metamethod.

[none]