- Main Page
- Modules
- Namespaces
- Classes
- Files

# Global Math Functions

Miscellaneous math functions. More...

## Functions
template<class Type>
Type | Abs (Type x)
| Absolute value.
template<class Type>
Type | Mod (Type j, Type k)
| j modulo k.
template<class Type>
Type | PosMod (Type j, Type k)
| Positive wing of j modulo k.
template<class Type>
Real | Max (Type L)
| Maximum value of list L.
template<class Type>
Integer | MaxPos (Type L)
| Index of the maximum value of list L.
template<class Type>
Real | Min (Type L)
| Minimum value of list L.
template<class Type>
Integer | MinPos (Type L)
| Index of the minimum value of list L.
Real | Floor (Real x)
| Floor function.
Real | Ceiling (Real x)
| Ceiling function.
Real | Sqrt (Real x)
| Square root.
Real | Pow (Real x, Real y)
| x to the power of y.
template<class Type>
Type | Log (Type x)
| Log of x to the base E.
template<class Type>
Type | Log10 (Type x)
| Log base 10 of x.
template<class Type>
Type | Atan (Type x)
| Arctangent of x.
template<class Type>
Type | Atan2 (Type x, Type y)
| Arctangent of ratio expressed as numerator x and denominator y.
template<class Type>
Type | Sin (Type x)
| Sine of Type x.
template<class Type>
Type | Cos (Type x)
| Cosine of Type x.

## Detailed Description

Miscellaneous math functions.

## Function Documentation

template<class Type>

Type Abs | ( | Type | x | ) | `[inline]`

Absolute value.

Parameters:

  | x | value

template<class Type>

Type Atan | ( | Type | x | ) | `[inline]`

Arctangent of x.

Note: Type must be a floating point type.

Parameters:

  | x | Value

template<class Type>

Type Atan2 | ( | Type | x,
|  | Type | y |
| ) |  |  | `[inline]`

Arctangent of ratio expressed as numerator x and denominator y.

Note: Type must be a floating point type.

Parameters:

  | x | numerator
  | y | denominator

Real Ceiling | ( | Real | x | ) | `[inline]`

Ceiling function.

Parameters:

  | x | Real value

template<class Type>

Type Cos | ( | Type | x | ) | `[inline]`

Cosine of Type x.

Note: Type must be a floating point type.

Parameters:

  | x | Value

Real Floor | ( | Real | x | ) | `[inline]`

Floor function.

Parameters:

  | x | Real value

template<class Type>

Type Log | ( | Type | x | ) | `[inline]`

Log of x to the base E.

Note: Type must be a floating point type.

Parameters:

  | x | Value

template<class Type>

Type Log10 | ( | Type | x | ) | `[inline]`

Log base 10 of x.

Note: Type must be a floating point type.

Parameters:

  | x | Value

template<class Type>

Real Max | ( | Type | L | ) | `[inline]`

Maximum value of list L.

Parameters:

  | L | List

template<class Type>

Integer MaxPos | ( | Type | L | ) | `[inline]`

Index of the maximum value of list L.

Parameters:

  | L | List

template<class Type>

Real Min | ( | Type | L | ) | `[inline]`

Minimum value of list L.

Parameters:

  | L | List

template<class Type>

Integer MinPos | ( | Type | L | ) | `[inline]`

Index of the minimum value of list L.

Parameters:

  | L | List

template<class Type>

Type Mod | ( | Type | j,
|  | Type | k |
| ) |  |  | `[inline]`

j modulo k.

Note: Because of its implementation, Type need not be an integral type.

Parameters:

  | j | Base of modulo operation
  | k | Modulus of modulo operation

template<class Type>

Type PosMod | ( | Type | j,
|  | Type | k |
| ) |  |  | `[inline]`

Positive wing of j modulo k.

PosMod performs modulus arithmetic but returns only the positive wing of modulus values. Note: Because of its implementation, Type need not be an integral type.

Parameters:

  | j | Base of modulo operation
  | k | Modulus of modulo operation Note, the result will always be positive.

Real Pow | ( | Real | x,
|  | Real | y |
| ) |  |  | `[inline]`

x to the power of y.

Parameters:

  | x | Base
  | y | Exponent

template<class Type>

Type Sin | ( | Type | x | ) | `[inline]`

Sine of Type x.

Note: Type must be a floating point type.

Parameters:

  | x | Value

Real Sqrt | ( | Real | x | ) | `[inline]`

Square root.

Parameters:

  | x | Real value