maxon Math

Detailed Description

Classes

class  LIMIT< T >
 
class  LIMIT< Int64 >
 
class  LIMIT< UInt64 >
 
class  LIMIT< Int32 >
 
class  LIMIT< UInt32 >
 
class  LIMIT< Int16 >
 
class  LIMIT< UInt16 >
 
class  LIMIT< Char >
 
class  LIMIT< UChar >
 
class  LIMIT< Float32 >
 
class  LIMIT< Float64 >
 

Macros

#define SIZEOF(x)
 

Functions

Float32 Clamp01 (Float32 a)
 
Float64 Clamp01 (Float64 a)
 
Float32 Sin (Float32 val)
 
Float64 Sin (Float64 val)
 
Float32 Cos (Float32 val)
 
Float64 Cos (Float64 val)
 
Float32 Tan (Float32 val)
 
Float64 Tan (Float64 val)
 
Float32 ATan (Float32 val)
 
Float64 ATan (Float64 val)
 
Float32 ATan2 (Float32 valY, Float32 valX)
 
Float64 ATan2 (Float64 valY, Float64 valX)
 
Float32 Exp (Float32 val)
 
Float64 Exp (Float64 val)
 
Float32 Ln (Float32 val)
 
Float64 Ln (Float64 val)
 
Float32 Log10 (Float32 val)
 
Float64 Log10 (Float64 val)
 
Float32 Log2 (Float32 val)
 
Float64 Log2 (Float64 val)
 
Float32 Sqrt (Float32 val)
 
Float64 Sqrt (Float64 val)
 
Float32 Floor (Float32 val)
 
Float64 Floor (Float64 val)
 
Float32 Ceil (Float32 val)
 
Float64 Ceil (Float64 val)
 
Float32 Modf (Float32 val, Float32 *intpart)
 
Float64 Modf (Float64 val, Float64 *intpart)
 
Float32 Pow (Float32 v1, Float32 v2)
 
Float64 Pow (Float64 v1, Float64 v2)
 
Float32 Sinh (Float32 val)
 
Float64 Sinh (Float64 val)
 
Float32 Cosh (Float32 val)
 
Float64 Cosh (Float64 val)
 
Float32 Tanh (Float32 val)
 
Float64 Tanh (Float64 val)
 
Float32 FMod (Float32 v1, Float32 v2)
 
Float64 FMod (Float64 v1, Float64 v2)
 
Float32 Abs (Float32 val)
 
Float64 Abs (Float64 val)
 
Float32 Inverse (Float32 f)
 
Float64 Inverse (Float64 f)
 
Float32 Round (Float32 f)
 
Float64 Round (Float64 f)
 
template<typename X >
Abs (X f)
 
template<typename X >
Min (X a, X b)
 
template<typename X >
Max (X a, X b)
 
template<typename X >
void Swap (X &a, X &b)
 
template<typename X >
ClampValue (X value, X lowerLimit, X upperLimit)
 
Float32 Blend (Float32 value1, Float32 value2, Float32 blendValue)
 
Float64 Blend (Float64 value1, Float64 value2, Float64 blendValue)
 
template<typename X >
Sqr (X a, X b)
 
template<typename X >
Sqr (X a)
 
Float32 ASin (Float32 val)
 
Float64 ASin (Float64 val)
 
Float32 ACos (Float32 val)
 
Float64 ACos (Float64 val)
 
Float32 DegToRad (Float32 r)
 
Float64 DegToRad (Float64 r)
 
Float32 RadToDeg (Float32 r)
 
Float64 RadToDeg (Float64 r)
 
void SinCos (Float32 r, Float32 &sn, Float32 &cs)
 
void SinCos (Float64 r, Float64 &sn, Float64 &cs)
 
Int32 SAFEINT32 (Float32 x)
 
Int32 SAFEINT32 (Float64 x)
 
Int64 SAFEINT64 (Float32 x)
 
Int64 SAFEINT64 (Float64 x)
 
Int SAFEINT (Float64 x)
 
Int SAFEINT (Float32 x)
 
template<typename T >
void SetMax (T &a, const T &b)
 
template<typename T >
void SetMin (T &a, const T &b)
 

Variables

static const Float32 MINVALUE_FLOAT32
 
static const Float32 MAXVALUE_FLOAT32
 
static const Float64 MINVALUE_FLOAT64
 
static const Float64 MAXVALUE_FLOAT64
 
static const Float32 MINVALUE_INT32_FLOAT32
 
static const Float32 MAXVALUE_INT32_FLOAT32
 
static const Float64 MINVALUE_INT64_FLOAT64
 
static const Float64 MAXVALUE_INT64_FLOAT64
 
static const Float32 MINRANGE_FLOAT32
 
static const Float32 MAXRANGE_FLOAT32
 
static const Float64 MINRANGE_FLOAT64
 
static const Float64 MAXRANGE_FLOAT64
 
static const Float MINVALUE_FLOAT
 
static const Float MAXVALUE_FLOAT
 
static const Float MINRANGE_FLOAT
 
static const Float MAXRANGE_FLOAT
 
static const Int NOTOK
 
static const Float64 PI
 
static const Float64 PI_INV
 
static const Float64 PI2
 
static const Float64 PI2_INV
 
static const Float64 PI05
 

Macro Definition Documentation

◆ SIZEOF

#define SIZEOF (   x)

Calculates the size of a datatype or element.

Function Documentation

◆ Clamp01() [1/2]

Float32 Clamp01 ( Float32  a)

Clip a floating point number against the lower limit 0 and the upper limit 1. The result will be returned.

◆ Clamp01() [2/2]

Float64 Clamp01 ( Float64  a)

Clip a floating point number against the lower limit 0 and the upper limit 1. The result will be returned.

◆ Sin() [1/2]

Float32 Sin ( Float32  val)

◆ Sin() [2/2]

Float64 Sin ( Float64  val)

◆ Cos() [1/2]

Float32 Cos ( Float32  val)

◆ Cos() [2/2]

Float64 Cos ( Float64  val)

◆ Tan() [1/2]

Float32 Tan ( Float32  val)

◆ Tan() [2/2]

Float64 Tan ( Float64  val)

◆ ATan() [1/2]

Float32 ATan ( Float32  val)

◆ ATan() [2/2]

Float64 ATan ( Float64  val)

◆ ATan2() [1/2]

Float32 ATan2 ( Float32  valY,
Float32  valX 
)

◆ ATan2() [2/2]

Float64 ATan2 ( Float64  valY,
Float64  valX 
)

◆ Exp() [1/2]

Float32 Exp ( Float32  val)

◆ Exp() [2/2]

Float64 Exp ( Float64  val)

◆ Ln() [1/2]

Float32 Ln ( Float32  val)

◆ Ln() [2/2]

Float64 Ln ( Float64  val)

◆ Log10() [1/2]

Float32 Log10 ( Float32  val)

◆ Log10() [2/2]

Float64 Log10 ( Float64  val)

◆ Log2() [1/2]

Float32 Log2 ( Float32  val)

◆ Log2() [2/2]

Float64 Log2 ( Float64  val)

◆ Sqrt() [1/2]

Float32 Sqrt ( Float32  val)

◆ Sqrt() [2/2]

Float64 Sqrt ( Float64  val)

◆ Floor() [1/2]

Float32 Floor ( Float32  val)

◆ Floor() [2/2]

Float64 Floor ( Float64  val)

◆ Ceil() [1/2]

Float32 Ceil ( Float32  val)

◆ Ceil() [2/2]

Float64 Ceil ( Float64  val)

◆ Modf() [1/2]

Float32 Modf ( Float32  val,
Float32 intpart 
)

◆ Modf() [2/2]

Float64 Modf ( Float64  val,
Float64 intpart 
)

◆ Pow() [1/2]

Float32 Pow ( Float32  v1,
Float32  v2 
)

◆ Pow() [2/2]

Float64 Pow ( Float64  v1,
Float64  v2 
)

◆ Sinh() [1/2]

Float32 Sinh ( Float32  val)

◆ Sinh() [2/2]

Float64 Sinh ( Float64  val)

◆ Cosh() [1/2]

Float32 Cosh ( Float32  val)

◆ Cosh() [2/2]

Float64 Cosh ( Float64  val)

◆ Tanh() [1/2]

Float32 Tanh ( Float32  val)

◆ Tanh() [2/2]

Float64 Tanh ( Float64  val)

◆ FMod() [1/2]

Float32 FMod ( Float32  v1,
Float32  v2 
)

◆ FMod() [2/2]

Float64 FMod ( Float64  v1,
Float64  v2 
)

◆ Abs() [1/3]

Float32 Abs ( Float32  val)

◆ Abs() [2/3]

Float64 Abs ( Float64  val)

◆ Inverse() [1/2]

Float32 Inverse ( Float32  f)

Calculates the reciprocal value (multiplicative inverse). If the input value is zero, zero will be returned for safety to avoid exceptions.

◆ Inverse() [2/2]

Float64 Inverse ( Float64  f)

Calculates the reciprocal value (multiplicative inverse). If the input value is zero, zero will be returned for safety to avoid exceptions.

◆ Round() [1/2]

Float32 Round ( Float32  f)

Rounds a floating point value

Since
R18

◆ Round() [2/2]

Float64 Round ( Float64  f)

Rounds a floating point value

Since
R18

◆ Abs() [3/3]

X Abs ( f)

Calculates the absolute value of any data type.

◆ Min()

X Min ( a,
b 
)

Calculates the minimum of two values and return it.

◆ Max()

X Max ( a,
b 
)

Calculates the maximum of two values and return it.

◆ Swap()

void Swap ( X &  a,
X &  b 
)

Swaps two values. If available, move semantics will be used.

◆ ClampValue()

X ClampValue ( value,
lowerLimit,
upperLimit 
)

Clips a value against a lower and upper limit. The new value is returned.

◆ Blend() [1/2]

Float32 Blend ( Float32  value1,
Float32  value2,
Float32  blendValue 
)

Clips a value against a lower and upper limit. The new value is returned.

◆ Blend() [2/2]

Float64 Blend ( Float64  value1,
Float64  value2,
Float64  blendValue 
)

◆ Sqr() [1/2]

X Sqr ( a,
b 
)

Calculates square difference of two values.

◆ Sqr() [2/2]

X Sqr ( a)

Calculates square of a value.

◆ ASin() [1/2]

Float32 ASin ( Float32  val)

Calculates arcsine. The input value is clipped for safety to avoid exceptions.

◆ ASin() [2/2]

Float64 ASin ( Float64  val)

Calculates arcsine. The input value is clipped for safety to avoid exceptions.

◆ ACos() [1/2]

Float32 ACos ( Float32  val)

Calculates arccosine. The input value is clipped for safety to avoid exceptions.

◆ ACos() [2/2]

Float64 ACos ( Float64  val)

Calculates arccosine. The input value is clipped for safety to avoid exceptions.

◆ DegToRad() [1/2]

Float32 DegToRad ( Float32  r)

Converts float value from degrees to radians.

Since
R18

◆ DegToRad() [2/2]

Float64 DegToRad ( Float64  r)

Converts float value from degrees to radians.

Since
R18

◆ RadToDeg() [1/2]

Float32 RadToDeg ( Float32  r)

Converts float value from radians to degrees.

Since
R18

◆ RadToDeg() [2/2]

Float64 RadToDeg ( Float64  r)

Converts float value from radians to degrees.

Since
R18

◆ SinCos() [1/2]

void SinCos ( Float32  r,
Float32 sn,
Float32 cs 
)

◆ SinCos() [2/2]

void SinCos ( Float64  r,
Float64 sn,
Float64 cs 
)

◆ SAFEINT32() [1/2]

Int32 SAFEINT32 ( Float32  x)

Safely converts a 32 bit float value into Int32. The resulting value will be clipped against the Int32 boundaries, without raising an exception.

◆ SAFEINT32() [2/2]

Int32 SAFEINT32 ( Float64  x)

Safely converts a 64 bit float value into Int32. The resulting value will be clipped against the Int32 boundaries, without raising an exception.

◆ SAFEINT64() [1/2]

Int64 SAFEINT64 ( Float32  x)

Safely converts a 32 bit float value into Int64. The resulting value will be clipped against the Int64 boundaries, without raising an exception.

◆ SAFEINT64() [2/2]

Int64 SAFEINT64 ( Float64  x)

Safely converts a 64 bit float value into Int64. The resulting value will be clipped against the Int64 boundaries, without raising an exception

◆ SAFEINT() [1/2]

Int SAFEINT ( Float64  x)

Safely converts a 64 bit float value into Int. The resulting value will be clipped against the Int boundaries, without raising an exception

◆ SAFEINT() [2/2]

Int SAFEINT ( Float32  x)

Safely converts a 32 bit float value into Int. The resulting value will be clipped against the Int boundaries, without raising an exception

◆ SetMax()

void SetMax ( T &  a,
const T &  b 
)

Assigns the maximum of two values to the first value.

Parameters
[in,out]aFirst value.
[in]bSecond value.

◆ SetMin()

void SetMin ( T &  a,
const T &  b 
)

Assigns the minimum of two values to the first value.

Parameters
[in,out]aFirst value.
[in]bSecond value.

Variable Documentation

◆ MINVALUE_FLOAT32

const Float32 MINVALUE_FLOAT32
static

the minimum value a Float32 can represent

◆ MAXVALUE_FLOAT32

const Float32 MAXVALUE_FLOAT32
static

the maximum value a Float32 can represent

◆ MINVALUE_FLOAT64

const Float64 MINVALUE_FLOAT64
static

the minimum value a Float64 can represent

◆ MAXVALUE_FLOAT64

const Float64 MAXVALUE_FLOAT64
static

the maximum value a Float64 can represent

◆ MINVALUE_INT32_FLOAT32

const Float32 MINVALUE_INT32_FLOAT32
static

minimum Float32 value that can be represented by Int32 (-0x7FFFFF80). Lower values will results in an overflow

◆ MAXVALUE_INT32_FLOAT32

const Float32 MAXVALUE_INT32_FLOAT32
static

maximum Float32 value that can be represented by Int32 ( 0x7FFFFF80). Higher values will results in an overflow

◆ MINVALUE_INT64_FLOAT64

const Float64 MINVALUE_INT64_FLOAT64
static

minimum Float64 value that can be represented by Int64 (-0x7ffffffffffffdff). Lower values will results in an overflow

◆ MAXVALUE_INT64_FLOAT64

const Float64 MAXVALUE_INT64_FLOAT64
static

maximum Float64 value that can be represented by Int64 ( 0x7ffffffffffffdff). Higher values will results in an overflow

◆ MINRANGE_FLOAT32

const Float32 MINRANGE_FLOAT32
static

'safe' minimum range for Float32. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MAXRANGE_FLOAT32

const Float32 MAXRANGE_FLOAT32
static

'safe' maximum range for Float32. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MINRANGE_FLOAT64

const Float64 MINRANGE_FLOAT64
static

'safe' minimum range for Float. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MAXRANGE_FLOAT64

const Float64 MAXRANGE_FLOAT64
static

'safe' maximum range for Float. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MINVALUE_FLOAT

const Float MINVALUE_FLOAT
static

the minimum value a Float can represent

◆ MAXVALUE_FLOAT

const Float MAXVALUE_FLOAT
static

the maximum value a Float can represent

◆ MINRANGE_FLOAT

const Float MINRANGE_FLOAT
static

'safe' minimum range for Float64. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MAXRANGE_FLOAT

const Float MAXRANGE_FLOAT
static

'safe' maximum range for Float64. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ NOTOK

const Int NOTOK
static

constant used for special cases

◆ PI

const Float64 PI
static

floating point constant: PI

◆ PI_INV

const Float64 PI_INV
static

floating point constant: 1.0 / PI

◆ PI2

const Float64 PI2
static

floating point constant: 2.0 * PI

◆ PI2_INV

const Float64 PI2_INV
static

floating point constant: 1.0 / (2.0 * PI)

◆ PI05

const Float64 PI05
static

floating point constant: 0.5 * PI