Om  1.0.0
A universal framework for multimedia simulation
Namespaces | Classes | Typedefs | Functions
om::math Namespace Reference

A namespace containing classes and functions that do fast math operations. More...

Namespaces

 detail
 

Classes

class  AABB1D
 A class that represents a range of values in 1D space. More...
 
class  AABB2D
 A class that represents a range of values in 2D space. More...
 
class  AABB3D
 A class that represents a range of values in 3D space. More...
 
class  Complex
 A class that represents a complex number. More...
 
class  Edge
 
class  ExponentialDistribution
 A class that generates an exponential probability distribution for the templated type. More...
 
class  ExponentialDistribution< double >
 A class that generates an exponential probability distribution for 64-bit floats. More...
 
class  ExponentialDistribution< float >
 A class that generates an exponential probability distribution for 32-bit floats. More...
 
class  FFT
 A class that implements a fast fourier transform for a specific power-of-two FFT size. More...
 
class  Fixed
 A class that represents a fixed-point number. More...
 
class  Interpolation
 A class that enumerates the different types of sampled function interpolation. More...
 
class  Matrix
 A class that represents a matrix of an arbitrary number of rows and columns. More...
 
class  MatrixND
 A class that represents a matrix of a fixed arbitrary number of rows and columns. More...
 
class  MatrixND< T, 2, 2 >
 A class that represents a 2x2 matrix. More...
 
class  MatrixND< T, 3, 3 >
 A class that represents a 3x3 matrix. More...
 
class  MatrixND< T, 4, 4 >
 A class that represents a 4x4 matrix. More...
 
class  NormalDistribution
 A class that generates a normal (gaussian) probability distribution for the templated type. More...
 
class  NormalDistribution< double >
 A class that generates a normal (gaussian) probability distribution for 64-bit floats. More...
 
class  NormalDistribution< float >
 A class that generates a normal (gaussian) probability distribution for 32-bit floats. More...
 
class  Plane2D
 A class that represents a plane in 2D space. More...
 
class  Plane3D
 A class that represents a plane in 3D space. More...
 
class  PoissonDistribution
 A class that generates a Poisson probability distribution. More...
 
class  Quaternion4D
 A templatized math class representing a 4-component quaternion. More...
 
class  Random
 A class representing a random number generator for the templated data type. More...
 
class  Ray2D
 A class that represents a ray in 2D space. More...
 
class  Ray3D
 A class that represents a ray in 3D space. More...
 
class  RNGOutput
 
class  RNGOutput< 1 >
 
class  RNGOutput< 2 >
 
class  RNGOutput< 4 >
 
class  RNGOutput< 8 >
 
class  ScalarType
 A class that represents a type of scalar math value. More...
 
class  SH
 A class that contains functions that evaluate spherical harmonics at arbitrary order. More...
 
class  SHExpansion
 A class that stores a spherical harmonic expansion of a template (possibly vector) type. More...
 
class  SHOrder
 Template prototype for functions that compute a spherical harmonic expansion for a fixed order. More...
 
class  SHOrder< U, T, 0 >
 A class containing functions that evaluate spherical harmonics of order 0. More...
 
class  SHOrder< U, T, 1 >
 A class containing functions that evaluate spherical harmonics of order 1. More...
 
class  SHOrder< U, T, 10 >
 A class containing functions that evaluate spherical harmonics of order 10. More...
 
class  SHOrder< U, T, 11 >
 A class containing functions that evaluate spherical harmonics of order 11. More...
 
class  SHOrder< U, T, 12 >
 A class containing functions that evaluate spherical harmonics of order 12. More...
 
class  SHOrder< U, T, 13 >
 A class containing functions that evaluate spherical harmonics of order 13. More...
 
class  SHOrder< U, T, 14 >
 A class containing functions that evaluate spherical harmonics of order 14. More...
 
class  SHOrder< U, T, 15 >
 A class containing functions that evaluate spherical harmonics of order 15. More...
 
class  SHOrder< U, T, 16 >
 A class containing functions that evaluate spherical harmonics of order 16. More...
 
class  SHOrder< U, T, 17 >
 A class containing functions that evaluate spherical harmonics of order 17. More...
 
class  SHOrder< U, T, 18 >
 A class containing functions that evaluate spherical harmonics of order 18. More...
 
class  SHOrder< U, T, 19 >
 A class containing functions that evaluate spherical harmonics of order 19. More...
 
class  SHOrder< U, T, 2 >
 A class containing functions that evaluate spherical harmonics of order 2. More...
 
class  SHOrder< U, T, 20 >
 A class containing functions that evaluate spherical harmonics of order 20. More...
 
class  SHOrder< U, T, 3 >
 A class containing functions that evaluate spherical harmonics of order 3. More...
 
class  SHOrder< U, T, 4 >
 A class containing functions that evaluate spherical harmonics of order 4. More...
 
class  SHOrder< U, T, 5 >
 A class containing functions that evaluate spherical harmonics of order 5. More...
 
class  SHOrder< U, T, 6 >
 A class containing functions that evaluate spherical harmonics of order 6. More...
 
class  SHOrder< U, T, 7 >
 A class containing functions that evaluate spherical harmonics of order 7. More...
 
class  SHOrder< U, T, 8 >
 A class containing functions that evaluate spherical harmonics of order 8. More...
 
class  SHOrder< U, T, 9 >
 A class containing functions that evaluate spherical harmonics of order 9. More...
 
class  SHProjection
 A class that stores parameters for projecting a function into the spherical harmonic basis. More...
 
class  SIMDAABB3D
 
class  SIMDAABB3D< T, 4 >
 A class that represents a set of 3D vectors stored in a SIMD-compatible format. More...
 
class  SIMDArray
 The prototype for the SIMDArray class for wide SIMD operations. More...
 
class  SIMDArray< Float32, width >
 A class representing an N-component 32-bit floating-point SIMD scalar. More...
 
class  SIMDArray< Int32, width >
 A class representing an N-component 32-bit signed-integer SIMD scalar. More...
 
class  SIMDFlags
 A class that contains flags that specify the type of SIMD operations supported. More...
 
class  SIMDPlane3D
 A template prototype declaration for the SIMDPlane3D class. More...
 
class  SIMDPlane3D< T, 4 >
 A specialization for the SIMDPlane3D class that has a SIMD width of 4. More...
 
class  SIMDRay3D
 
class  SIMDRay3D< T, 4 >
 A class that represents a set of 3D rays stored in a SIMD-compatible format. More...
 
class  SIMDScalar
 The prototype for the SIMDScalar class. More...
 
class  SIMDScalar< Float32, 4 >
 A class representing a 4-component 32-bit floating-point SIMD scalar. More...
 
class  SIMDScalar< Float64, 2 >
 A class representing a 2-component 64-bit floating-point SIMD scalar. More...
 
class  SIMDScalar< Int16, 8 >
 A class representing a 8-component 16-bit signed-integer SIMD scalar. More...
 
class  SIMDScalar< Int32, 4 >
 A class representing a 4-component 32-bit signed-integer SIMD scalar. More...
 
class  SIMDScalar< Int64, 2 >
 A class representing a 2-component 64-bit signed integer SIMD scalar. More...
 
class  SIMDTriangle3D
 A template prototype declaration for the SIMDAABB3D class. More...
 
class  SIMDTriangle3D< T, 4 >
 A specialization for the SIMDTriangle3D class that has a SIMD width of 4. More...
 
class  SIMDType
 A class that contains a way to access various global properties of SIMD processing. More...
 
class  SIMDType< Float32 >
 A class that contains attributes for Float32-typed SIMDScalar processing. More...
 
class  SIMDType< Float64 >
 A class that contains attributes for Float64-typed SIMDScalar processing. More...
 
class  SIMDType< Int32 >
 A class that contains attributes for Int32-typed SIMDScalar processing. More...
 
class  SIMDType< Int64 >
 A class that contains attributes for Int32-typed SIMDScalar processing. More...
 
class  SIMDVector3D
 
class  SIMDVector3D< T, 4 >
 A class that represents a set of 3D vectors stored in a SIMD-compatible format. More...
 
class  Sphere2D
 A class that represents a sphere in 2D space (a circle). More...
 
class  Sphere3D
 A class that represents a sphere in 3D space. More...
 
class  Swizzle2D
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle2D< T, dimension, i0, i0 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle3D
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle3D< T, dimension, i0, i0, i0 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle3D< T, dimension, i0, i1, i1 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle3D< T, dimension, i1, i0, i1 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle3D< T, dimension, i1, i1, i0 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  Swizzle4D
 A class that is used to implement arbitrary vector permutations. More...
 
class  Tensor
 A class that stores a generalized mathematical value of arbitrary dimension and type. More...
 
class  TensorType
 A class that represents the type of a general math tensor. More...
 
class  Transform2D
 A class that represents a 2-dimensional transformation. More...
 
class  Transform3D
 A class that represents a 3-dimensional transformation. More...
 
class  Triangle
 
class  UniformDistribution
 A class that represents a uniform probability distribution of the templated type. More...
 
class  VectorND
 A class that represents a vector of a fixed arbitrary number of components. More...
 
class  VectorND< T, 2 >
 A class that represents a 2-dimensional point or vector. More...
 
class  VectorND< T, 3 >
 A class that represents a 3-dimensional point or vector. More...
 
class  VectorND< T, 4 >
 A templatized math class representing a 4-dimensional vector. More...
 
class  Xoroshiro128
 An implementation of the Xoroshiro128+ pseudorandom number generator. More...
 

Typedefs

typedef MatrixND< int, 2, 2 > Matrix2i
 
typedef MatrixND< float, 2, 2 > Matrix2f
 
typedef MatrixND< double, 2, 2 > Matrix2d
 
typedef Plane2D< int > Plane2i
 
typedef Plane2D< float > Plane2f
 
typedef Plane2D< double > Plane2d
 
typedef Plane3D< int > Plane3i
 
typedef Plane3D< float > Plane3f
 
typedef Plane3D< double > Plane3d
 
typedef SIMDScalar< Float32, 4 > SIMDFloat4
 
typedef SIMDScalar< Float64, 2 > SIMDDouble2
 
typedef SIMDScalar< Int32, 4 > SIMDInt4
 
typedef SIMDScalar< Float32, SIMDType< Float32 >::MAX_WIDTH > SIMDFloat
 
typedef SIMDScalar< Float64, SIMDType< Float64 >::MAX_WIDTH > SIMDDouble
 
typedef SIMDScalar< Int32, SIMDType< Int32 >::MAX_WIDTH > SIMDInt
 
typedef Transform2D< int > Transform2i
 
typedef Transform2D< float > Transform2f
 
typedef Transform2D< double > Transform2d
 
typedef Transform3D< int > Transform3i
 
typedef Transform3D< float > Transform3f
 
typedef Transform3D< double > Transform3d
 
typedef AABB1D< int > AABB1i
 
typedef AABB1D< float > AABB1f
 
typedef AABB1D< double > AABB1d
 
typedef AABB2D< int > AABB2i
 
typedef AABB2D< float > AABB2f
 
typedef AABB2D< double > AABB2d
 
typedef AABB3D< int > AABB3i
 
typedef AABB3D< float > AABB3f
 
typedef AABB3D< double > AABB3d
 
typedef MatrixND< int, 3, 3 > Matrix3i
 
typedef MatrixND< float, 3, 3 > Matrix3f
 
typedef MatrixND< double, 3, 3 > Matrix3d
 
typedef MatrixND< int, 4, 4 > Matrix4i
 
typedef MatrixND< float, 4, 4 > Matrix4f
 
typedef MatrixND< double, 4, 4 > Matrix4d
 
typedef VectorND< int, 2 > Vector2i
 
typedef VectorND< float, 2 > Vector2f
 
typedef VectorND< double, 2 > Vector2d
 
typedef VectorND< Size, 2 > Size2D
 
typedef VectorND< int, 3 > Vector3i
 
typedef VectorND< float, 3 > Vector3f
 
typedef VectorND< double, 3 > Vector3d
 
typedef VectorND< Size, 3 > Size3D
 
typedef VectorND< int, 4 > Vector4i
 
typedef VectorND< float, 4 > Vector4f
 
typedef VectorND< double, 4 > Vector4d
 
typedef VectorND< Size, 4 > Size4D
 
typedef Quaternion4D< int > Quaternion4i
 
typedef Quaternion4D< float > Quaternion4f
 
typedef Quaternion4D< double > Quaternion4d
 
typedef Ray2D< int > Ray2i
 
typedef Ray2D< float > Ray2f
 
typedef Ray2D< double > Ray2d
 
typedef Ray3D< int > Ray3i
 
typedef Ray3D< float > Ray3f
 
typedef Ray3D< double > Ray3d
 
typedef Sphere2D< int > Sphere2i
 
typedef Sphere2D< float > Sphere2f
 
typedef Sphere2D< double > Sphere2d
 
typedef Sphere3D< int > Sphere3i
 
typedef Sphere3D< float > Sphere3f
 
typedef Sphere3D< double > Sphere3d
 

Functions

template<typename T >
sum (const T *array, Size number)
 Compute and return the sum of all of the values in the specified array. More...
 
template<>
Float32 sum (const Float32 *array, Size number)
 
template<>
Float64 sum (const Float64 *array, Size number)
 
template<typename T >
void add (T *destination, const T &scalar, Size number)
 Add a scalar value to each entry in the destination array, storing the result. More...
 
template<>
void add (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void add (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void add (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void add (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T >
void add (Complex< T > *destination, T scalar, Size number)
 
template<typename T , Size size>
void add (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T , Size size0, Size size1>
void add (MatrixND< T, size0, size1 > *destination, T scalar, Size number)
 
template<typename T >
void add (T *destination, const T *b, Size number)
 Add each entry of the second array to each entry in the destination array, storing the result. More...
 
template<>
void add (Int32 *destination, const Int32 *b, Size number)
 
template<>
void add (Int64 *destination, const Int64 *b, Size number)
 
template<>
void add (Float32 *destination, const Float32 *b, Size number)
 
template<>
void add (Float64 *destination, const Float64 *b, Size number)
 
template<typename T >
void add (Complex< T > *destination, const Complex< T > *b, Size number)
 
template<typename T , Size size>
void add (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T , Size size0, Size size1>
void add (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *b, Size number)
 
template<typename T >
void add (T *destination, const T *a, const T *b, Size number)
 Add the entries of two arrays and store the result in the destination array. More...
 
template<>
void add (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void add (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void add (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void add (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<typename T >
void add (Complex< T > *destination, const Complex< T > *a, const Complex< T > *b, Size number)
 
template<typename T , Size size>
void add (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T , Size size0, Size size1>
void add (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *a, const MatrixND< T, size0, size1 > *b, Size number)
 
template<typename T >
void add (T *destination, const T *a, const T &scalar, Size number)
 Add a scalar value to each entry in the destination array, storing the result. More...
 
template<>
void add (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void add (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void add (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void add (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T >
void add (Complex< T > *destination, const Complex< T > *a, T scalar, Size number)
 
template<typename T , Size size>
void add (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T , Size size0, Size size1>
void add (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *a, T scalar, Size number)
 
template<typename T >
void negate (T *destination, Size number)
 Negate each element in the specified array, storing the result in the same array. More...
 
template<>
void negate (Int32 *destination, Size number)
 
template<>
void negate (Int64 *destination, Size number)
 
template<>
void negate (Float32 *destination, Size number)
 
template<>
void negate (Float64 *destination, Size number)
 
template<typename T >
void negate (Complex< T > *destination, Size number)
 
template<typename T , Size size>
void negate (VectorND< T, size > *destination, Size number)
 
template<typename T , Size size0, Size size1>
void negate (MatrixND< T, size0, size1 > *destination, Size number)
 
template<typename T >
void negate (T *destination, const T *a, Size number)
 Negate each element in an array, storing the result in a destination array. More...
 
template<>
void negate (Int32 *destination, const Int32 *b, Size number)
 
template<>
void negate (Int64 *destination, const Int64 *b, Size number)
 
template<>
void negate (Float32 *destination, const Float32 *b, Size number)
 
template<>
void negate (Float64 *destination, const Float64 *b, Size number)
 
template<typename T >
void negate (Complex< T > *destination, const Complex< T > *b, Size number)
 
template<typename T , Size size>
void negate (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T , Size size0, Size size1>
void negate (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *b, Size number)
 
template<typename T >
void subtract (T *destination, const T &scalar, Size number)
 Subtract a scalar from each element of the destination array, storing the result in the destination. More...
 
template<>
void subtract (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void subtract (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void subtract (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void subtract (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T >
void subtract (Complex< T > *destination, T scalar, Size number)
 
template<typename T , Size size>
void subtract (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T , Size size0, Size size1>
void subtract (MatrixND< T, size0, size1 > *destination, T scalar, Size number)
 
template<typename T >
void subtract (T *destination, const T *b, Size number)
 Subtract each entry of the second array from the destination array and store the result in the destination. More...
 
template<>
void subtract (Int32 *destination, const Int32 *b, Size number)
 
template<>
void subtract (Int64 *destination, const Int64 *b, Size number)
 
template<>
void subtract (Float32 *destination, const Float32 *b, Size number)
 
template<>
void subtract (Float64 *destination, const Float64 *b, Size number)
 
template<typename T >
void subtract (Complex< T > *destination, const Complex< T > *b, Size number)
 
template<typename T , Size size>
void subtract (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T , Size size0, Size size1>
void subtract (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *b, Size number)
 
template<typename T >
void subtract (T *destination, const T *a, const T *b, Size number)
 Subtract an array from another and store the result in the destination array. More...
 
template<>
void subtract (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void subtract (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void subtract (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void subtract (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<typename T >
void subtract (Complex< T > *destination, const Complex< T > *a, const Complex< T > *b, Size number)
 
template<typename T , Size size>
void subtract (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T , Size size0, Size size1>
void subtract (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *a, const MatrixND< T, size0, size1 > *b, Size number)
 
template<typename T >
void subtract (T *destination, const T *a, const T &scalar, Size number)
 Subtract a scalar from an array and store the result in the destination array. More...
 
template<>
void subtract (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void subtract (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void subtract (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void subtract (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T >
void subtract (Complex< T > *destination, const Complex< T > *a, T scalar, Size number)
 
template<typename T , Size size>
void subtract (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T , Size size0, Size size1>
void subtract (MatrixND< T, size0, size1 > *destination, const MatrixND< T, size0, size1 > *a, T scalar, Size number)
 
template<typename T >
product (const T *array, Size number)
 Compute and return the product of all of the values in the specified array. More...
 
template<>
Float32 product (const Float32 *array, Size number)
 
template<>
Float64 product (const Float64 *array, Size number)
 
template<typename T >
norm (const T *array, Size number)
 Compute and return the euclidean norm (length) of the specified vector. More...
 
template<>
Float32 norm (const Float32 *array, Size number)
 
template<>
Float64 norm (const Float64 *array, Size number)
 
template<typename T >
dot (const T *a, const T *b, Size number)
 Compute and return the dot product of the values in the two given arrays. More...
 
template<>
Float32 dot (const Float32 *a, const Float32 *b, Size number)
 
template<>
Float64 dot (const Float64 *a, const Float64 *b, Size number)
 
template<typename T >
void multiply (T *destination, const T &scalar, Size number)
 Multiply each entry in the destination array by a scalar and store the result in the destination. More...
 
template<>
void multiply (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void multiply (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void multiply (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void multiply (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void multiply (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T >
void multiply (T *destination, const T *b, Size number)
 Multiply each entry in the destination array by another array entry and store the result in the destination. More...
 
template<>
void multiply (Int32 *destination, const Int32 *b, Size number)
 
template<>
void multiply (Int64 *destination, const Int64 *b, Size number)
 
template<>
void multiply (Float32 *destination, const Float32 *b, Size number)
 
template<>
void multiply (Float64 *destination, const Float64 *b, Size number)
 
template<typename T , Size size>
void multiply (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T >
void multiply (T *destination, const T *a, const T *b, Size number)
 Multiply the elements in two arrays and store the result of each multiplication in the destination. More...
 
template<>
void multiply (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void multiply (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void multiply (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void multiply (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<>
void multiply (Complex< Float32 > *destination, const Complex< Float32 > *a, const Complex< Float32 > *b, Size number)
 
template<typename T , Size size>
void multiply (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T >
void multiply (T *destination, const T *a, const T &scalar, Size number)
 Multiply the elements in an array by a scalar and store the result in the destination array. More...
 
template<>
void multiply (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void multiply (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void multiply (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void multiply (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void multiply (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T >
void multiplyAdd (T *destination, const T &scalar, Size number)
 Multiply each entry in the destination by a scalar, then add the result to the destination array entry. More...
 
template<>
void multiplyAdd (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void multiplyAdd (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void multiplyAdd (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void multiplyAdd (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void multiplyAdd (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T >
void multiplyAdd (T *destination, const T *b, Size number)
 Multiply each entry in the destination by another array, then add the result to the destination entry. More...
 
template<>
void multiplyAdd (Int32 *destination, const Int32 *b, Size number)
 
template<>
void multiplyAdd (Int64 *destination, const Int64 *b, Size number)
 
template<>
void multiplyAdd (Float32 *destination, const Float32 *b, Size number)
 
template<>
void multiplyAdd (Float64 *destination, const Float64 *b, Size number)
 
template<typename T , Size size>
void multiplyAdd (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T >
void multiplyAdd (T *destination, const T *a, const T *b, Size number)
 Multiply the enties of two arrays and add the results to the destination array entries. More...
 
template<>
void multiplyAdd (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void multiplyAdd (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void multiplyAdd (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void multiplyAdd (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<>
void multiplyAdd (Complex< Float32 > *destination, const Complex< Float32 > *a, const Complex< Float32 > *b, Size number)
 
template<typename T , Size size>
void multiplyAdd (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T >
void multiplyAdd (T *destination, const T *a, const T &scalar, Size number)
 Multiply the entries of an array by a scalar, then add the result to a destination array. More...
 
template<>
void multiplyAdd (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void multiplyAdd (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void multiplyAdd (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void multiplyAdd (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void multiplyAdd (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T >
void multiplySubtract (T *destination, const T &scalar, Size number)
 Multiply each entry in the destination by a scalar, then subtract the result from the destination array entry. More...
 
template<>
void multiplySubtract (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void multiplySubtract (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void multiplySubtract (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void multiplySubtract (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void multiplySubtract (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T >
void multiplySubtract (T *destination, const T *b, Size number)
 Multiply each entry in the destination by another array, then subtract the result from the destination entry. More...
 
template<>
void multiplySubtract (Int32 *destination, const Int32 *b, Size number)
 
template<>
void multiplySubtract (Int64 *destination, const Int64 *b, Size number)
 
template<>
void multiplySubtract (Float32 *destination, const Float32 *b, Size number)
 
template<>
void multiplySubtract (Float64 *destination, const Float64 *b, Size number)
 
template<typename T , Size size>
void multiplySubtract (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T >
void multiplySubtract (T *destination, const T *a, const T *b, Size number)
 Multiply the enties of two arrays and subtract the results from the destination array entries. More...
 
template<>
void multiplySubtract (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void multiplySubtract (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void multiplySubtract (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void multiplySubtract (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<typename T , Size size>
void multiplySubtract (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T >
void multiplySubtract (T *destination, const T *a, const T &scalar, Size number)
 Multiply the entries of an array by a scalar, then subtract the result from a destination array. More...
 
template<>
void multiplySubtract (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void multiplySubtract (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void multiplySubtract (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void multiplySubtract (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void multiplySubtract (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T >
void divide (T *destination, const T &scalar, Size number)
 Divide each entry in the destination array by a scalar and store the result in the destination. More...
 
template<>
void divide (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void divide (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void divide (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void divide (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void divide (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T >
void divide (T *destination, const T *b, Size number)
 Divide each entry in the destination array by another array entry and store the result in the destination. More...
 
template<>
void divide (Int32 *destination, const Int32 *b, Size number)
 
template<>
void divide (Int64 *destination, const Int64 *b, Size number)
 
template<>
void divide (Float32 *destination, const Float32 *b, Size number)
 
template<>
void divide (Float64 *destination, const Float64 *b, Size number)
 
template<typename T , Size size>
void divide (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T >
void divide (T *destination, const T *a, const T *b, Size number)
 Divide the elements of one array by those in another and store the result in the destination. More...
 
template<>
void divide (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void divide (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void divide (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void divide (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<typename T , Size size>
void divide (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T >
void divide (T *destination, const T *a, const T &scalar, Size number)
 Divide the elements in an array by a scalar and store the result in the destination array. More...
 
template<>
void divide (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void divide (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void divide (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void divide (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void divide (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T >
void divideAdd (T *destination, const T &scalar, Size number)
 Divide each entry in the destination by a scalar, then add the result to the destination array entry. More...
 
template<>
void divideAdd (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void divideAdd (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void divideAdd (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void divideAdd (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void divideAdd (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T >
void divideAdd (T *destination, const T *b, Size number)
 Divide each entry in the destination by another array, then add the result to the destination entry. More...
 
template<>
void divideAdd (Int32 *destination, const Int32 *b, Size number)
 
template<>
void divideAdd (Int64 *destination, const Int64 *b, Size number)
 
template<>
void divideAdd (Float32 *destination, const Float32 *b, Size number)
 
template<>
void divideAdd (Float64 *destination, const Float64 *b, Size number)
 
template<typename T , Size size>
void divideAdd (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T >
void divideAdd (T *destination, const T *a, const T *b, Size number)
 Divide the enties of one array by another and add the results to the destination array entries. More...
 
template<>
void divideAdd (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void divideAdd (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void divideAdd (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void divideAdd (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<typename T , Size size>
void divideAdd (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T >
void divideAdd (T *destination, const T *a, const T &scalar, Size number)
 Divide the entries of an array by a scalar, then add the result to a destination array. More...
 
template<>
void divideAdd (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void divideAdd (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void divideAdd (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void divideAdd (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void divideAdd (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T >
void divideSubtract (T *destination, const T &scalar, Size number)
 Divide each entry in the destination by a scalar, then subtract the result from the destination array entry. More...
 
template<>
void divideSubtract (Int32 *destination, const Int32 &scalar, Size number)
 
template<>
void divideSubtract (Int64 *destination, const Int64 &scalar, Size number)
 
template<>
void divideSubtract (Float32 *destination, const Float32 &scalar, Size number)
 
template<>
void divideSubtract (Float64 *destination, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void divideSubtract (VectorND< T, size > *destination, T scalar, Size number)
 
template<typename T >
void divideSubtract (T *destination, const T *b, Size number)
 Divide each entry in the destination by another array, then subtract the result from the destination entry. More...
 
template<>
void divideSubtract (Int32 *destination, const Int32 *b, Size number)
 
template<>
void divideSubtract (Int64 *destination, const Int64 *b, Size number)
 
template<>
void divideSubtract (Float32 *destination, const Float32 *b, Size number)
 
template<>
void divideSubtract (Float64 *destination, const Float64 *b, Size number)
 
template<typename T , Size size>
void divideSubtract (VectorND< T, size > *destination, const VectorND< T, size > *b, Size number)
 
template<typename T >
void divideSubtract (T *destination, const T *a, const T *b, Size number)
 Divide the enties of one array by another and subtract the results from the destination array entries. More...
 
template<>
void divideSubtract (Int32 *destination, const Int32 *a, const Int32 *b, Size number)
 
template<>
void divideSubtract (Int64 *destination, const Int64 *a, const Int64 *b, Size number)
 
template<>
void divideSubtract (Float32 *destination, const Float32 *a, const Float32 *b, Size number)
 
template<>
void divideSubtract (Float64 *destination, const Float64 *a, const Float64 *b, Size number)
 
template<typename T , Size size>
void divideSubtract (VectorND< T, size > *destination, const VectorND< T, size > *a, const VectorND< T, size > *b, Size number)
 
template<typename T >
void divideSubtract (T *destination, const T *a, const T &scalar, Size number)
 Divide the entries of an array by a scalar, then subtract the result from a destination array. More...
 
template<>
void divideSubtract (Int32 *destination, const Int32 *a, const Int32 &scalar, Size number)
 
template<>
void divideSubtract (Int64 *destination, const Int64 *a, const Int64 &scalar, Size number)
 
template<>
void divideSubtract (Float32 *destination, const Float32 *a, const Float32 &scalar, Size number)
 
template<>
void divideSubtract (Float64 *destination, const Float64 *a, const Float64 &scalar, Size number)
 
template<typename T , Size size>
void divideSubtract (VectorND< T, size > *destination, const VectorND< T, size > *a, T scalar, Size number)
 
template<typename T >
void abs (T *destination, Size number)
 Compute the absolute value of each entry in an array and store the result in the same array. More...
 
template<>
void abs (Int32 *destination, Size number)
 
template<>
void abs (Float32 *destination, Size number)
 
template<>
void abs (Float64 *destination, Size number)
 
template<typename T >
void abs (T *destination, const T *a, Size number)
 Compute the absolute value of each entry in an array and store the result in the destination array. More...
 
template<>
void abs (Int32 *destination, const Int32 *a, Size number)
 
template<>
void abs (Float32 *destination, const Float32 *a, Size number)
 
template<>
void abs (Float64 *destination, const Float64 *a, Size number)
 
template<typename T >
void sqrt (T *destination, Size number)
 Compute the square root of each entry in an array and store the result in the same array. More...
 
template<>
void sqrt (Int32 *destination, Size number)
 
template<>
void sqrt (Float32 *destination, Size number)
 
template<>
void sqrt (Float64 *destination, Size number)
 
template<typename T >
void sqrt (T *destination, const T *a, Size number)
 Compute the square root of each entry in an array and store the result in the destination array. More...
 
template<>
void sqrt (Int32 *destination, const Int32 *a, Size number)
 
template<>
void sqrt (Float32 *destination, const Float32 *a, Size number)
 
template<>
void sqrt (Float64 *destination, const Float64 *a, Size number)
 
template<typename T >
void floor (T *destination, Size number)
 Compute the floor of each entry in an array and store the result in the same array. More...
 
template<>
void floor (Float32 *destination, Size number)
 
template<>
void floor (Float64 *destination, Size number)
 
template<typename T >
void floor (T *destination, const T *a, Size number)
 Compute the floor of each entry in an array and store the result in the destination array. More...
 
template<>
void floor (Float32 *destination, const Float32 *a, Size number)
 
template<>
void floor (Float64 *destination, const Float64 *a, Size number)
 
template<typename T >
void ceiling (T *destination, Size number)
 Compute the ceiling of each entry in an array and store the result in the same array. More...
 
template<>
void ceiling (Float32 *destination, Size number)
 
template<>
void ceiling (Float64 *destination, Size number)
 
template<typename T >
void ceiling (T *destination, const T *a, Size number)
 Compute the ceiling of each entry in an array and store the result in the destination array. More...
 
template<>
void ceiling (Float32 *destination, const Float32 *a, Size number)
 
template<>
void ceiling (Float64 *destination, const Float64 *a, Size number)
 
template<typename T >
void min (T *destination, const T *a, const T *b, Size number)
 Find the smaller of each pair of entries in two arrays and store the result in the destination. More...
 
template<typename T >
min (const T *array, Size number)
 Compute and return the minimum value in the specified array. More...
 
template<typename T >
void max (T *destination, const T *a, const T *b, Size number)
 Find the larger of each pair of entries in two arrays and store the result in the destination. More...
 
template<typename T >
max (const T *array, Size number)
 Compute and return the maximum value in the specified array. More...
 
template<typename T >
Bool operator== (T value, const Complex< T > &complex)
 Return whether or not a r number is equal to a complex number. More...
 
template<typename T >
Bool operator!= (T value, const Complex< T > &complex)
 Return whether or not a r number is not equal to a complex number. More...
 
template<typename T >
Complex< T > operator+ (T value, const Complex< T > &complex)
 Add a complex number to a r number and return the resulting complex number. More...
 
template<typename T >
Complex< T > operator- (T value, const Complex< T > &complex)
 Subtract a complex number from a r number and return the resulting complex number. More...
 
template<typename T >
Complex< T > operator* (T value, const Complex< T > &complex)
 Multiply a r number by a complex number and return the resulting complex number. More...
 
template<typename T >
Complex< T > operator/ (T value, const Complex< T > &complex)
 Divide a r number by a complex number and return the resulting complex number. More...
 
template<typename T >
abs (const Complex< T > &complex)
 Return the absolute value (magnitude) of the specified complex number. More...
 
template<typename T >
Bool convolve (const T *input, Size inputSize, const T *filter, Size filterSize, T *output)
 Convolve the specified input signal with the given filter kernel. More...
 
void fft (Complex< Float32 > *inOut, Size size)
 Convert N complex values to N complex values in-place using the forward transform. More...
 
void ifft (Complex< Float32 > *inOut, Size size)
 Convert N complex values to N complex values using the reverse transform. More...
 
void fft (Float32 *inOut, Size size)
 Convert N real float values to N/2+1 complex values in place. More...
 
void fft (const Float32 *input, Complex< Float32 > *output, Size size)
 Convert N real float values to N/2+1 complex values. More...
 
void ifft (Float32 *inOut, Size size)
 Convert N/2+1 complex values to N real float values in place. More...
 
void ifft (const Complex< Float32 > *input, Float32 *output, Size size)
 Convert N/2+1 complex values to N real float values. More...
 
void fftShift (Complex< Float32 > *data, Size size)
 Shift the zero-frequency components of the specified array to the center of the array. More...
 
template<typename T >
Bool fft2D (Complex< T > *data, Size width, Size height)
 Compute the forward 2D Fourier transform in-place on the specified array of complex numbers. More...
 
template<typename T >
Bool ifft2D (Complex< T > *data, Size width, Size height)
 Compute the inverse 2D Fourier transform in-place on the specified array of complex numbers. More...
 
template<typename T >
Bool fftShift2D (Complex< T > *data, Size width, Size height)
 Shift the zero-frequency components of the specified 2D matrix to the center of the matrix. More...
 
template<typename T , typename BaseType , Size fractionalBits>
Bool operator== (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Bool operator!= (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Bool operator<= (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Bool operator>= (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Bool operator< (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Bool operator> (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Fixed< BaseType, fractionalBits > operator+ (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Fixed< BaseType, fractionalBits > operator- (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Fixed< BaseType, fractionalBits > operator* (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
Fixed< BaseType, fractionalBits > operator/ (T a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
T & operator+= (T &a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
T & operator-= (T &a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
T & operator*= (T &a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T , typename BaseType , Size fractionalBits>
T & operator/= (T &a, const Fixed< BaseType, fractionalBits > &b)
 
template<typename T >
Matrix< T > operator+ (const T &c, const Matrix< T > &matrix)
 Add a scalar to a matrix's elements and return the resulting matrix. More...
 
template<typename T >
Matrix< T > operator- (const T &c, const Matrix< T > &matrix)
 Subtract a matrix's elements from a scalar and return the resulting matrix. More...
 
template<typename T >
Matrix< T > operator* (const T &c, const Matrix< T > &matrix)
 Multiply a matrix's elements by a scalar and return the resulting matrix. More...
 
template<typename T >
Bool leastSquares (const Matrix< T > &A, const Matrix< T > &b, Matrix< T > &x)
 Use a least-squares algorithm to find the best fitting solution for a linear system A*x = b. More...
 
template<typename T >
Bool solve (const Matrix< T > &A, const Matrix< T > &b, Matrix< T > &x)
 Solve a linear system of the form A*x = b., returning whether or not it was able to be solved. More...
 
template<typename T >
void qr (const Matrix< T > &A, Matrix< T > &Q, Matrix< T > &R)
 Factorize a matrix A into the product A = Q*R, where Q is orthornormal and R is upper-triangular. More...
 
template<typename T >
void qr (const Matrix< T > &A, Matrix< T > &Q, Matrix< T > &R, Matrix< Index > &permutation)
 Factorize a matrix A into the product A = Q*R, where Q is orthornormal and R is upper-triangular. More...
 
template<typename T >
void lu (const Matrix< T > &matrix, Matrix< T > &L, Matrix< T > &U)
 
template<typename T >
VectorND< T, 2 > operator* (const VectorND< T, 2 > &vector, const MatrixND< T, 2, 2 > &matrix)
 'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose. More...
 
template<typename T >
MatrixND< T, 2, 2 > operator* (const T &value, const MatrixND< T, 2, 2 > &matrix)
 Multiply a matrix's elements by a scalar and return the resulting matrix. More...
 
template<typename T >
MatrixND< T, 2, 2 > operator+ (const T &value, const MatrixND< T, 2, 2 > &matrix)
 Add a scalar to the elements of a matrix and return the resulting matrix. More...
 
template<typename T >
MatrixND< T, 2, 2 > abs (const MatrixND< T, 2, 2 > &matrix)
 Return the absolute value of the specified matrix, such that the every component is positive. More...
 
template<typename T >
MatrixND< T, 3, 3 > operator+ (const T &value, const MatrixND< T, 3, 3 > &matrix)
 Add a sclar value to a matrix's elements and return the resulting matrix. More...
 
template<typename T >
VectorND< T, 3 > operator* (const VectorND< T, 3 > &vector, const MatrixND< T, 3, 3 > &matrix)
 'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose. More...
 
template<typename T >
MatrixND< T, 3, 3 > operator* (const T &value, const MatrixND< T, 3, 3 > &matrix)
 Multiply a matrix's elements by a scalar and return the resulting matrix. More...
 
template<typename T >
MatrixND< T, 3, 3 > abs (const MatrixND< T, 3, 3 > &matrix)
 Return the absolute value of the specified matrix, such that the every component is positive. More...
 
template<typename T >
VectorND< T, 3 > eulerXYZ (const MatrixND< T, 3, 3 > &m)
 Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in XYZ order. More...
 
template<typename T >
VectorND< T, 3 > eulerXZY (const MatrixND< T, 3, 3 > &m)
 Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in XZY order. More...
 
template<typename T >
VectorND< T, 3 > eulerYXZ (const MatrixND< T, 3, 3 > &m)
 Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in YXZ order. More...
 
template<typename T >
VectorND< T, 3 > eulerYZX (const MatrixND< T, 3, 3 > &m)
 Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in YZX order. More...
 
template<typename T >
VectorND< T, 3 > eulerZXY (const MatrixND< T, 3, 3 > &m)
 Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in ZXY order. More...
 
template<typename T >
VectorND< T, 3 > eulerZYX (const MatrixND< T, 3, 3 > &m)
 Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in ZYX order. More...
 
template<class T >
MatrixND< T, 4, 4 > operator+ (const T &value, const MatrixND< T, 4, 4 > &matrix)
 Add a sclar value to a matrix's elements and return the resulting matrix. More...
 
template<typename T >
VectorND< T, 4 > operator* (const VectorND< T, 4 > &vector, const MatrixND< T, 4, 4 > &matrix)
 'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose. More...
 
template<class T >
MatrixND< T, 4, 4 > operator* (const T &value, const MatrixND< T, 4, 4 > &matrix)
 Multiply a matrix's elements by a scalar and return the resulting matrix. More...
 
template<typename T >
MatrixND< T, 4, 4 > abs (const MatrixND< T, 4, 4 > &matrix)
 Return the absolute value of the specified matrix, such that the every component is positive. More...
 
template<typename T , Size numRows, Size numColumns>
MatrixND< T, numRows, numColumns > operator+ (const T &c, const MatrixND< T, numRows, numColumns > &matrix)
 Multiply a matrix's elements by a scalar and return the resulting matrix. More...
 
template<typename T , Size numRows, Size numColumns>
VectorND< T, numColumns > operator* (const VectorND< T, numRows > &vector, const MatrixND< T, numRows, numColumns > &matrix)
 'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose. More...
 
template<typename T , Size numRows, Size numColumns>
MatrixND< T, numRows, numColumns > operator* (const T &c, const MatrixND< T, numRows, numColumns > &matrix)
 Multiply a matrix's elements by a scalar and return the resulting matrix. More...
 
template<typename T >
nextPowerOf2Prime (T value)
 Return a prime number larger than the specified value, but smaller than the next power of two. More...
 
template<>
unsigned int nextPowerOf2Prime (unsigned int value)
 
template<>
unsigned long nextPowerOf2Prime (unsigned long value)
 
template<>
unsigned long long nextPowerOf2Prime (unsigned long long value)
 
template<typename T >
Quaternion4D< T > operator* (const T &value, const Quaternion4D< T > &quaternion)
 Multiply every component of the quaternion with the value, returning a quaternion result. More...
 
template<typename T >
dot (const Quaternion4D< T > &q1, const Quaternion4D< T > &q2)
 Compute and return the dot product of two quaternions. More...
 
template<typename T >
Quaternion4D< T > slerp (const Quaternion4D< T > &q1, const Quaternion4D< T > &q2, T a)
 Use spherical linear interpolation to interpolate two quaternions. More...
 
template<typename T >
random ()
 
template<typename T >
random (T min, T max)
 
template<typename T >
void setRandomSeed (T newSeed)
 
template<typename T , typename U >
Bool resample (const T *input, Size inputSize, T *output, U factor, Size filterWidth, U filterFactor=U(0.499))
 Resample the input data by the given factor and put the result in the output. More...
 
template<typename T >
pi ()
 
template<typename T >
e ()
 
template<typename T >
nan ()
 Return the Not-A-Number representation for the templated type, or zero if it has none. More...
 
template<typename T >
infinity ()
 Return the Infinity representation for the templated type, or the maximum value if it has none. More...
 
template<typename T >
negativeInfinity ()
 Return the Negative Infinity representation for the templated type, or the minimum value if it has none. More...
 
template<>
unsigned char negativeInfinity< unsigned char > ()
 Return the Negative Infinity representation for the templated type, or the minimum value if it has none. More...
 
template<>
unsigned short negativeInfinity< unsigned short > ()
 Return the Negative Infinity representation for the templated type, or the minimum value if it has none. More...
 
template<>
unsigned int negativeInfinity< unsigned int > ()
 Return the Negative Infinity representation for the templated type, or the minimum value if it has none. More...
 
template<>
unsigned long negativeInfinity< unsigned long > ()
 Return the Negative Infinity representation for the templated type, or the minimum value if it has none. More...
 
template<>
unsigned long long negativeInfinity< unsigned long long > ()
 Return the Negative Infinity representation for the templated type, or the minimum value if it has none. More...
 
template<typename T >
max ()
 Return the maximum allowable finite value for the template parameter type. More...
 
template<typename T >
min ()
 Return the minimum allowable finite value for the template parameter type. More...
 
template<>
float min< float > ()
 Return the minimum allowable finite value for the template parameter type. More...
 
template<>
double min< double > ()
 Return the minimum allowable finite value for the template parameter type. More...
 
template<typename T >
minPositive ()
 Return the smallest normalized positive value for the template parameter type. More...
 
template<typename T >
epsilon ()
 Return the smallest deviation from the value 1 that the templated type can represent. More...
 
template<>
float epsilon ()
 Return the smallest deviation from the value 1 that a float can represent. More...
 
template<>
double epsilon ()
 Return the smallest deviation from the value 1 that a double can represent. More...
 
template<typename T >
bool isInfinity (T number)
 Return whether a number is equal to the representation of Infinity for its type. More...
 
template<typename T >
bool isNegativeInfinity (T number)
 Return whether a number is equal to the representation of Negative Infinity for its type. More...
 
template<>
bool isNegativeInfinity (unsigned char number)
 
template<>
bool isNegativeInfinity (unsigned short number)
 
template<>
bool isNegativeInfinity (unsigned int number)
 
template<>
bool isNegativeInfinity (unsigned long number)
 
template<>
bool isNegativeInfinity (unsigned long long number)
 
template<typename T >
bool isInfinite (T number)
 Return whether a number is equal to Negative or Positive Infinity for its type. More...
 
template<typename T >
bool isFinite (T number)
 Return whether a number is finite. More...
 
template<typename T >
bool isNAN (T number)
 Return whether or not the specified number is Not-A-Number. More...
 
template<>
bool isNAN (float number)
 
template<>
bool isNAN (double number)
 
template<typename T >
bool isInteger ()
 
template<>
bool isInteger< char > ()
 
template<>
bool isInteger< unsigned char > ()
 
template<>
bool isInteger< short > ()
 
template<>
bool isInteger< unsigned short > ()
 
template<>
bool isInteger< int > ()
 
template<>
bool isInteger< unsigned int > ()
 
template<>
bool isInteger< long > ()
 
template<>
bool isInteger< unsigned long > ()
 
template<>
bool isInteger< long long > ()
 
template<>
bool isInteger< unsigned long long > ()
 
template<typename T >
bool isInteger (T number)
 
template<typename T >
bool isFloatingPoint ()
 
template<>
bool isFloatingPoint< float > ()
 
template<>
bool isFloatingPoint< double > ()
 
template<typename T >
bool isFloatingPoint (T number)
 
template<typename T >
abs (T number)
 Return the absolute value of the specified number, such that the result is positive. More...
 
template<>
float abs (float number)
 
template<>
double abs (double number)
 
template<>
unsigned char abs (unsigned char value)
 
template<>
unsigned short abs (unsigned short value)
 
template<>
unsigned int abs (unsigned int value)
 
template<>
unsigned long abs (unsigned long value)
 
template<>
unsigned long long abs (unsigned long long value)
 
template<typename T >
sign (T number)
 Return -1 if the number is less than zero, 0 if it is zero, and 1 otherwise. More...
 
template<>
unsigned char sign (unsigned char value)
 
template<>
unsigned short sign (unsigned short value)
 
template<>
unsigned int sign (unsigned int value)
 
template<>
unsigned long sign (unsigned long value)
 
template<>
unsigned long long sign (unsigned long long value)
 
template<typename T >
bool equals (T value1, T value2)
 
template<>
bool equals (float value1, float value2)
 
template<>
bool equals (double value1, double value2)
 
template<typename T >
bool fuzzyEquals (T value1, T value2, T epsilon)
 
template<typename T >
bool isZero (T value, T epsilon)
 
template<typename T >
bool isZero (T value)
 
template<>
bool isZero (float value)
 
template<>
bool isZero (double value)
 
template<typename T >
average (T value1, T value2)
 
template<>
float average (float value1, float value2)
 
template<>
double average (double value1, double value2)
 
template<typename T >
max (T value1, T value2)
 Return the larger of two numbers. More...
 
template<typename T >
min (T value1, T value2)
 Return the smaller of two numbers. More...
 
template<typename T >
clamp (T number, T minimum, T maximum)
 Return the result when the a number is constrainted to the interval [minimum, maximum]. More...
 
template<typename T >
floor (T number)
 Return the largest whole number smaller than the number parameter, as the same type. More...
 
template<>
float floor (float number)
 
template<>
double floor (double number)
 
template<typename T >
ceiling (T number)
 
template<>
float ceiling (float number)
 
template<>
double ceiling (double number)
 
template<typename T >
round (T value)
 
template<>
float round (float value)
 
template<>
double round (double value)
 
template<typename T >
sqrti (T value)
 
template<typename T >
sqrt (T value)
 
template<>
float sqrt (float value)
 
template<>
double sqrt (double value)
 
template<typename T >
previousMultiple (T number, T base)
 Get the previous multiple of a base that is less than or equal to a specified number. More...
 
template<typename T >
nextMultiple (T number, T base)
 Get the next multiple of a base that is greater than or equal to a specified number. More...
 
template<typename T >
nearestMultiple (T number, T base)
 Get the multiple of a base that the closest to a specified number. More...
 
template<typename T >
nextPowerOfTwo (T x)
 Return the first power of two larger than the specified number. More...
 
template<>
char nextPowerOfTwo (char x)
 Return the first power of two larger than the specified number. More...
 
template<>
unsigned char nextPowerOfTwo (unsigned char x)
 Return the first power of two larger than the specified number. More...
 
template<>
short nextPowerOfTwo (short x)
 Return the first power of two larger than the specified number. More...
 
template<>
unsigned short nextPowerOfTwo (unsigned short x)
 Return the first power of two larger than the specified number. More...
 
template<>
int nextPowerOfTwo (int x)
 Return the first power of two larger than the specified number. More...
 
template<>
unsigned int nextPowerOfTwo (unsigned int x)
 Return the first power of two larger than the specified number. More...
 
template<>
long nextPowerOfTwo (long x)
 Return the first power of two larger than the specified number. More...
 
template<>
unsigned long nextPowerOfTwo (unsigned long x)
 Return the first power of two larger than the specified number. More...
 
template<>
long long nextPowerOfTwo (long long x)
 Return the first power of two larger than the specified number. More...
 
template<>
unsigned long long nextPowerOfTwo (unsigned long long x)
 Return the first power of two larger than the specified number. More...
 
template<typename T >
Bool isPowerOfTwo (T number)
 Return whether or not the specified number is a power of 2. More...
 
template<typename T , typename U >
pow (T base, U power)
 
template<>
char pow (char base, char power)
 
template<>
unsigned char pow (unsigned char base, unsigned char power)
 
template<>
short pow (short base, short power)
 
template<>
unsigned short pow (unsigned short base, unsigned short power)
 
template<>
int pow (int base, int power)
 
template<>
unsigned int pow (unsigned int base, unsigned int power)
 
template<>
long pow (long base, long power)
 
template<>
unsigned long pow (unsigned long base, unsigned long power)
 
template<>
long long pow (long long base, long long power)
 
template<>
unsigned long long pow (unsigned long long base, unsigned long long power)
 
template<typename T >
square (T value)
 
template<typename T >
ln (T value)
 
template<typename T >
log10 (T value)
 
template<>
short log10 (short value)
 
template<>
unsigned short log10 (unsigned short value)
 
template<>
int log10 (int value)
 
template<>
unsigned int log10 (unsigned int value)
 
template<>
long log10 (long value)
 
template<>
unsigned long log10 (unsigned long value)
 
template<>
long long log10 (long long value)
 
template<>
unsigned long long log10 (unsigned long long value)
 
template<typename T >
log (T value, T base)
 
template<>
float log (float value, float base)
 
template<typename T >
log2 (T value)
 
template<>
float log2 (float value)
 
template<>
double log2 (double value)
 
template<typename T >
bitCount (T bits)
 
template<>
UInt32 bitCount (UInt32 bits)
 
template<>
UInt64 bitCount (UInt64 bits)
 
template<typename T >
firstSetBit (T bits)
 
template<>
UInt32 firstSetBit (UInt32 bits)
 
template<>
UInt64 firstSetBit (UInt64 bits)
 
template<typename T >
lastSetBit (T bits)
 
template<>
UInt32 lastSetBit (UInt32 bits)
 
template<>
UInt64 lastSetBit (UInt64 bits)
 
template<typename T >
mod (T value, T divisor)
 Compute the remainder when the specified value is divided by the given divisor. More...
 
template<>
float mod (float value, float divisor)
 Compute the remainder when the specified value is divided by the given divisor. More...
 
template<>
double mod (double value, double divisor)
 Compute the remainder when the specified value is divided by the given divisor. More...
 
float radiansToDegrees (float number)
 
double radiansToDegrees (double number)
 
float degreesToRadians (float number)
 
double degreesToRadians (double number)
 
template<typename T >
linearToDB (T linear)
 Convert the specfied linear ratio to a logarithmic ratio in decibels. More...
 
template<typename T >
dbToLinear (T db)
 Convert the specfied logarithmic ratio in decibels to a linear ratio. More...
 
template<typename T >
sec (T value)
 Compute and return the secant of the specified value. More...
 
template<typename T >
csc (T value)
 Compute and return the cosecant of the specified value. More...
 
template<typename T >
cot (T value)
 Compute and return the cotangent of the specified value. More...
 
template<typename T >
sech (T value)
 Compute and return the secant of the specified value. More...
 
template<typename T >
csch (T value)
 Compute and return the cosecant of the specified value. More...
 
template<typename T >
coth (T value)
 Compute and return the cotangent of the specified value. More...
 
template<typename T >
asinh (T value)
 Compute and return the inverse hyperbolic sine of the specified value. More...
 
template<typename T >
acosh (T value)
 Compute and return the inverse hyperbolic cosine of the specified value. More...
 
template<typename T >
atanh (T value)
 Compute and return the inverse hyperbolic tangent of the specified value. More...
 
template<typename T >
asech (T value)
 Compute and return the inverse hyperbolic secant of the specified value. More...
 
template<typename T >
acsch (T value)
 Compute and return the inverse hyperbolic cosecant of the specified value. More...
 
template<typename T >
acoth (T value)
 Compute and return the inverse hyperbolic cotangent of the specified value. More...
 
template<>
ScalarType ScalarType::of< lang::Float16 > ()
 
template<>
void ScalarType::check< lang::Float16 > ()
 
template<typename T , Size width>
SIMDArray< T, width > operator+ (const T &value, const SIMDArray< T, width > &scalar)
 Add a scalar value to each component of this scalar and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDArray< T, width > operator- (const T &value, const SIMDArray< T, width > &scalar)
 Subtract a scalar value from each component of this scalar and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDArray< T, width > operator* (const T &value, const SIMDArray< T, width > &scalar)
 Multiply a scalar value by each component of this scalar and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDArray< T, width > operator/ (const T &value, const SIMDArray< T, width > &scalar)
 Divide each component of this scalar by a scalar value and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDArray< T, width > abs (const SIMDArray< T, width > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
template<typename T , Size width>
SIMDArray< T, width > sqrt (const SIMDArray< T, width > &scalar)
 Compute the square root of each component of the specified SIMD scalar and return the result. More...
 
template<typename T , Size width>
SIMDArray< T, width > min (const SIMDArray< T, width > &scalar1, const SIMDArray< T, width > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
template<typename T , Size width>
SIMDArray< T, width > max (const SIMDArray< T, width > &scalar1, const SIMDArray< T, width > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > operator+ (const Float32 value, const SIMDArray< Float32, width > &scalar)
 Add a scalar value to each component of this scalar and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Float32, width > operator- (const Float32 value, const SIMDArray< Float32, width > &scalar)
 Subtract a scalar value from each component of this scalar and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Float32, width > operator* (const Float32 value, const SIMDArray< Float32, width > &scalar)
 Multiply a scalar value by each component of this scalar and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Float32, width > operator/ (const Float32 value, const SIMDArray< Float32, width > &scalar)
 Divide each component of this scalar by a scalar value and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Float32, width > abs (const SIMDArray< Float32, width > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > ceiling (const SIMDArray< Float32, width > &scalar)
 Compute the ceiling of each component of the specified SIMD scalar and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > floor (const SIMDArray< Float32, width > &scalar)
 Compute the floor of each component of the specified SIMD scalar and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > sqrt (const SIMDArray< Float32, width > &scalar)
 Compute the square root of each component of the specified SIMD scalar and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > min (const SIMDArray< Float32, width > &scalar1, const SIMDArray< Float32, width > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > max (const SIMDArray< Float32, width > &scalar1, const SIMDArray< Float32, width > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
template<Size width>
SIMDArray< Float32, width > select (const SIMDArray< Int32, width > &selector, const SIMDArray< Float32, width > &scalar1, const SIMDArray< Float32, width > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
template<Size width>
SIMDArray< Float32, width > ln (const SIMDArray< Float32, width > &scalar)
 Compute and return the natural logarithm of the specified vector. More...
 
template<Size width>
SIMDArray< Float32, width > log10 (const SIMDArray< Float32, width > &scalar)
 Compute and return the base-10 logarithm of the specified vector. More...
 
template<Size width>
SIMDArray< Float32, width > sin (const SIMDArray< Float32, width > &scalar)
 Compute and return the sine of the specified vector. More...
 
template<Size width>
SIMDArray< Float32, width > cos (const SIMDArray< Float32, width > &scalar)
 Compute and return the cosine of the specified vector. More...
 
template<Size width>
SIMDArray< Int32, width > operator+ (const Int32 value, const SIMDArray< Int32, width > &scalar)
 Add a scalar value to each component of this scalar and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Int32, width > operator- (const Int32 value, const SIMDArray< Int32, width > &scalar)
 Subtract a scalar value from each component of this scalar and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Int32, width > operator* (const Int32 value, const SIMDArray< Int32, width > &scalar)
 Multiply a scalar value by each component of this scalar and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Int32, width > operator/ (const Int32 value, const SIMDArray< Int32, width > &scalar)
 Divide each component of this scalar by a scalar value and return the resulting scalar. More...
 
template<Size width>
SIMDArray< Int32, width > abs (const SIMDArray< Int32, width > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
template<Size width>
SIMDArray< Int32, width > sqrt (const SIMDArray< Int32, width > &scalar)
 Compute the square root of each component of the specified SIMD scalar and return the result. More...
 
template<Size width>
SIMDArray< Int32, width > min (const SIMDArray< Int32, width > &scalar1, const SIMDArray< Int32, width > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
template<Size width>
SIMDArray< Int32, width > max (const SIMDArray< Int32, width > &scalar1, const SIMDArray< Int32, width > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
template<Size width>
SIMDArray< Int32, width > select (const SIMDArray< Int32, width > &selector, const SIMDArray< Int32, width > &scalar1, const SIMDArray< Int32, width > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
template<typename T , Size width>
SIMDScalar< T, width > operator+ (const T value, const SIMDScalar< T, width > &scalar)
 Add a scalar value to each component of this scalar and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDScalar< T, width > operator- (const Float32 value, const SIMDScalar< T, width > &scalar)
 Subtract a scalar value from each component of this scalar and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDScalar< T, width > operator* (const Float32 value, const SIMDScalar< T, width > &scalar)
 Multiply a scalar value by each component of this scalar and return the resulting scalar. More...
 
template<typename T , Size width>
SIMDScalar< T, width > operator/ (const Float32 value, const SIMDScalar< T, width > &scalar)
 Divide each component of this scalar by a scalar value and return the resulting scalar. More...
 
SIMDScalar< Float32, 4 > abs (const SIMDScalar< Float32, 4 > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float32, 4 > ceiling (const SIMDScalar< Float32, 4 > &scalar)
 Compute the ceiling of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float32, 4 > floor (const SIMDScalar< Float32, 4 > &scalar)
 Compute the floor of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float32, 4 > sqrt (const SIMDScalar< Float32, 4 > &scalar)
 Compute the square root of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float32, 4 > reciprocal (const SIMDScalar< Float32, 4 > &v)
 Return an approximate reciprocal of the specified value with 23 bits of precision. More...
 
SIMDScalar< Float32, 4 > reciprocalSqrt (const SIMDScalar< Float32, 4 > &v)
 Return an approximate reciprocal square root of the specified value with 23 bits of precision. More...
 
template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar< Float32, 4 > shuffle (const SIMDScalar< Float32, 4 > &scalar)
 Pick 4 elements from the specified SIMD scalar and return the result. More...
 
template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar< Float32, 4 > shuffle (const SIMDScalar< Float32, 4 > &scalar1, const SIMDScalar< Float32, 4 > &scalar2)
 Pick two elements from each SIMD scalar and return the result. More...
 
SIMDScalar< Float32, 4 > select (const SIMDScalar< Int32, 4 > &selector, const SIMDScalar< Float32, 4 > &scalar1, const SIMDScalar< Float32, 4 > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
SIMDScalar< Float32, 4 > lows (const SIMDScalar< Float32, 4 > &scalar)
 Copy the first and third element of the specified SIMD scalar into the second and fourth places. More...
 
SIMDScalar< Float32, 4 > highs (const SIMDScalar< Float32, 4 > &scalar)
 Copy the second and fourth element of the specified SIMD scalar into the first and third places. More...
 
SIMDScalar< Float32, 4 > subAdd (const SIMDScalar< Float32, 4 > &scalar1, const SIMDScalar< Float32, 4 > &scalar2)
 Subtract the first and third elements and add the second and fourth. More...
 
SIMDScalar< Float32, 4 > min (const SIMDScalar< Float32, 4 > &scalar1, const SIMDScalar< Float32, 4 > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Float32, 4 > max (const SIMDScalar< Float32, 4 > &scalar1, const SIMDScalar< Float32, 4 > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Float32, 4 > min (const SIMDScalar< Float32, 4 > &scalar)
 Compute the minimum component of the specified SIMD scalar and return the wide result. More...
 
SIMDScalar< Float32, 4 > max (const SIMDScalar< Float32, 4 > &scalar)
 Compute the maximum component of the specified SIMD scalar and return the wide result. More...
 
SIMDScalar< Float32, 4 > cross (const SIMDScalar< Float32, 4 > &v1, const SIMDScalar< Float32, 4 > &v2)
 Return the 3D cross product of two vectors, where each vector has the form (x,y,z,0). More...
 
SIMDScalar< Float32, 4 > dot (const SIMDScalar< Float32, 4 > &v1, const SIMDScalar< Float32, 4 > &v2)
 Return the dot product of two vectors. More...
 
SIMDScalar< Float32, 4 > normalize (const SIMDScalar< Float32, 4 > &v)
 Normalize the specified vector using a fast approximate algorithm, accurate to ~23 bits. More...
 
SIMDScalar< Float32, 4 > ln (const SIMDScalar< Float32, 4 > &v)
 Compute and return the natural logarithm of the specified vector. More...
 
SIMDScalar< Float32, 4 > log10 (const SIMDScalar< Float32, 4 > &v)
 Compute and return the base-10 logarithm of the specified vector. More...
 
SIMDScalar< Float32, 4 > sin (const SIMDScalar< Float32, 4 > &v)
 Compute and return the sine of the specified vector. More...
 
SIMDScalar< Float32, 4 > cos (const SIMDScalar< Float32, 4 > &v)
 Compute and return the cosine of the specified vector. More...
 
SIMDScalar< Float64, 2 > abs (const SIMDScalar< Float64, 2 > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float64, 2 > ceiling (const SIMDScalar< Float64, 2 > &scalar)
 Compute the ceiling of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float64, 2 > floor (const SIMDScalar< Float64, 2 > &scalar)
 Compute the floor of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Float64, 2 > sqrt (const SIMDScalar< Float64, 2 > &scalar)
 Compute the square root of each component of the specified SIMD scalar and return the result. More...
 
template<UInt i1, UInt i2>
SIMDScalar< Float64, 2 > shuffle (const SIMDScalar< Float64, 2 > &scalar)
 Pick 2 elements from the specified SIMD scalar and return the result. More...
 
template<UInt i1, UInt i2>
SIMDScalar< Float64, 2 > shuffle (const SIMDScalar< Float64, 2 > &scalar1, const SIMDScalar< Float64, 2 > &scalar2)
 Pick one element from each SIMD scalar and return the result. More...
 
SIMDScalar< Float64, 2 > select (const SIMDScalar< Int64, 2 > &selector, const SIMDScalar< Float64, 2 > &scalar1, const SIMDScalar< Float64, 2 > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
SIMDScalar< Float64, 2 > subAdd (const SIMDScalar< Float64, 2 > &scalar1, const SIMDScalar< Float64, 2 > &scalar2)
 Subtract the first and third elements and add the second and fourth. More...
 
SIMDScalar< Float64, 2 > min (const SIMDScalar< Float64, 2 > &scalar1, const SIMDScalar< Float64, 2 > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Float64, 2 > max (const SIMDScalar< Float64, 2 > &scalar1, const SIMDScalar< Float64, 2 > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Float64, 2 > min (const SIMDScalar< Float64, 2 > &scalar)
 Compute the minimum component of the specified SIMD scalar and return the wide result. More...
 
SIMDScalar< Float64, 2 > max (const SIMDScalar< Float64, 2 > &scalar)
 Compute the maximum component of the specified SIMD scalar and return the wide result. More...
 
SIMDScalar< Int16, 8 > abs (const SIMDScalar< Int16, 8 > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Int16, 8 > min (const SIMDScalar< Int16, 8 > &scalar1, const SIMDScalar< Int16, 8 > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Int16, 8 > max (const SIMDScalar< Int16, 8 > &scalar1, const SIMDScalar< Int16, 8 > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Int16, 8 > select (const SIMDScalar< Int16, 8 > &selector, const SIMDScalar< Int16, 8 > &scalar1, const SIMDScalar< Int16, 8 > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
SIMDScalar< Int32, 4 > abs (const SIMDScalar< Int32, 4 > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Int32, 4 > min (const SIMDScalar< Int32, 4 > &scalar1, const SIMDScalar< Int32, 4 > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Int32, 4 > max (const SIMDScalar< Int32, 4 > &scalar1, const SIMDScalar< Int32, 4 > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar< Int32, 4 > shuffle (const SIMDScalar< Int32, 4 > &scalar)
 Pick 4 elements from the specified SIMD scalar and return the result. More...
 
template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar< Int32, 4 > shuffle (const SIMDScalar< Int32, 4 > &scalar1, const SIMDScalar< Int32, 4 > &scalar2)
 Pick two elements from each SIMD scalar and return the result. More...
 
SIMDScalar< Int32, 4 > select (const SIMDScalar< Int32, 4 > &selector, const SIMDScalar< Int32, 4 > &scalar1, const SIMDScalar< Int32, 4 > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
SIMDScalar< Int32, 4 > lows (const SIMDScalar< Int32, 4 > &scalar)
 Copy the first and third element of the specified SIMD scalar into the second and fourth places. More...
 
SIMDScalar< Int32, 4 > highs (const SIMDScalar< Int32, 4 > &scalar)
 Copy the second and fourth element of the specified SIMD scalar into the first and third places. More...
 
SIMDScalar< Int64, 2 > abs (const SIMDScalar< Int64, 2 > &scalar)
 Compute the absolute value of each component of the specified SIMD scalar and return the result. More...
 
SIMDScalar< Int64, 2 > min (const SIMDScalar< Int64, 2 > &scalar1, const SIMDScalar< Int64, 2 > &scalar2)
 Compute the minimum of each component of the specified SIMD scalars and return the result. More...
 
SIMDScalar< Int64, 2 > max (const SIMDScalar< Int64, 2 > &scalar1, const SIMDScalar< Int64, 2 > &scalar2)
 Compute the maximum of each component of the specified SIMD scalars and return the result. More...
 
template<UInt i1, UInt i2>
SIMDScalar< Int64, 2 > shuffle (const SIMDScalar< Int64, 2 > &scalar)
 Pick 2 elements from the specified SIMD scalar and return the result. More...
 
template<UInt i1, UInt i2>
SIMDScalar< Int64, 2 > shuffle (const SIMDScalar< Int64, 2 > &scalar1, const SIMDScalar< Int64, 2 > &scalar2)
 Pick one element from each SIMD scalar and return the result. More...
 
SIMDScalar< Int64, 2 > select (const SIMDScalar< Int64, 2 > &selector, const SIMDScalar< Int64, 2 > &scalar1, const SIMDScalar< Int64, 2 > &scalar2)
 Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second. More...
 
template<typename T , Size width>
SIMDScalar< T, width > dot (const SIMDVector3D< T, width > &vector1, const SIMDVector3D< T, width > &vector2)
 Compute and return the dot product of two SIMD 3D vectors. More...
 
template<typename T , Size width>
SIMDVector3D< T, width > cross (const SIMDVector3D< T, width > &vector1, const SIMDVector3D< T, width > &vector2)
 Compute and return the cross product of two SIMD 3D vectors. More...
 
template<typename T >
dot (const SHExpansion< T > &sh1, const SHExpansion< T > &sh2)
 Compute the dot product of the specified spherical harmonic expansions. More...
 
Bool add (Tensor &tensor1, const Tensor &tensor2)
 Add a tensor to another tensor, modifying the first tensor. More...
 
Bool add (Tensor &result, const Tensor &tensor1, const Tensor &tensor2)
 Add two tensors, storing the result in a third tensor. More...
 
Bool subtract (Tensor &tensor1, const Tensor &tensor2)
 Add a tensor to another tensor, modifying the first tensor. More...
 
Bool subtract (Tensor &result, const Tensor &tensor1, const Tensor &tensor2)
 Add two tensors, storing the result in a third tensor. More...
 
Bool multiply (Tensor &tensor1, const Tensor &tensor2)
 Add a tensor to another tensor, modifying the first tensor. More...
 
Bool multiply (Tensor &result, const Tensor &tensor1, const Tensor &tensor2)
 Add two tensors, storing the result in a third tensor. More...
 
Bool multiplyScalars (Tensor &tensor1, const Tensor &tensor2)
 Add a tensor to another tensor, modifying the first tensor. More...
 
Bool multiplyScalars (Tensor &result, const Tensor &tensor1, const Tensor &tensor2)
 Add two tensors, storing the result in a third tensor. More...
 
Bool divide (Tensor &tensor1, const Tensor &tensor2)
 Add a tensor to another tensor, modifying the first tensor. More...
 
Bool divide (Tensor &result, const Tensor &tensor1, const Tensor &tensor2)
 Add two tensors, storing the result in a third tensor. More...
 
Bool divideScalars (Tensor &tensor1, const Tensor &tensor2)
 Add a tensor to another tensor, modifying the first tensor. More...
 
Bool divideScalars (Tensor &result, const Tensor &tensor1, const Tensor &tensor2)
 Add two tensors, storing the result in a third tensor. More...
 
Bool lu (const Tensor &A, Tensor &L, Tensor &U)
 Compute the LU factorization of an input matrix A returning the L and U matrices in the output parameters. More...
 
Bool qr (const Tensor &A, Tensor &Q, Tensor &R)
 Do a QR factorization of the specified matrix, returning the Q and R matrices in the output parameters. More...
 
Bool leastSquares (const Tensor &A, const Tensor &b, Tensor &x)
 Use a least-squares algorithm to find the best fitting solution for a linear system A*x = b. More...
 
Bool solve (const Tensor &A, const Tensor &b, Tensor &x)
 Solve a linear system A*x = b, returning whether or not it was able to be solved. More...
 
Bool invert (const Tensor &A, Tensor &inverse)
 Compute the inverse of the matrix A, returning whether or not it was able to be inverted. More...
 
template<>
void TensorType::check< lang::Float16 > ()
 
template<>
TensorType TensorType::of< lang::Float16 > ()
 
template<>
void TensorType::check< VectorND< lang::Float16, 2 > > ()
 
template<>
TensorType TensorType::of< VectorND< lang::Float16, 2 > > ()
 
template<>
void TensorType::check< VectorND< lang::Float16, 3 > > ()
 
template<>
TensorType TensorType::of< VectorND< lang::Float16, 3 > > ()
 
template<>
void TensorType::check< VectorND< lang::Float16, 4 > > ()
 
template<>
TensorType TensorType::of< VectorND< lang::Float16, 4 > > ()
 
template<>
void TensorType::check< Quaternion4D< lang::Float16 > > ()
 
template<>
TensorType TensorType::of< Quaternion4D< lang::Float16 > > ()
 
template<>
void TensorType::check< MatrixND< lang::Float16, 2, 2 > > ()
 
template<>
TensorType TensorType::of< MatrixND< lang::Float16, 2, 2 > > ()
 
template<>
void TensorType::check< MatrixND< lang::Float16, 3, 3 > > ()
 
template<>
TensorType TensorType::of< MatrixND< lang::Float16, 3, 3 > > ()
 
template<>
void TensorType::check< MatrixND< lang::Float16, 4, 4 > > ()
 
template<>
TensorType TensorType::of< MatrixND< lang::Float16, 4, 4 > > ()
 
template<typename T >
operator* (T value, const Transform2D< T > &transform)
 Scale the specified scalar value to object space with the inverse of the specified transformation. More...
 
template<typename T >
VectorND< T, 2 > operator* (const VectorND< T, 2 > &vector, const Transform2D< T > &transform)
 Transform the specified vector to object space with the inverse of the specified transformation. More...
 
template<typename T >
MatrixND< T, 2, 2 > operator* (const MatrixND< T, 2, 2 > &matrix, const Transform2D< T > &transform)
 Transform the specified matrix to object space with the inverse of the specified transformation. More...
 
template<typename T >
Ray2D< T > operator* (const Ray2D< T > &ray, const Transform2D< T > &transform)
 Transform the specified ray to object space with the inverse of the specified transformation. More...
 
template<typename T >
Plane2D< T > operator* (const Plane2D< T > &plane, const Transform2D< T > &transform)
 Transform the specified plane to object space with the inverse of the specified transformation. More...
 
template<typename T >
operator* (T value, const Transform3D< T > &transform)
 Scale the specified scalar value to object space with the inverse of the specified transformation. More...
 
template<typename T >
VectorND< T, 3 > operator* (const VectorND< T, 2 > &vector, const Transform3D< T > &transform)
 Transform the specified vector to object space with the inverse of the specified transformation. More...
 
template<typename T >
MatrixND< T, 3, 3 > operator* (const MatrixND< T, 2, 2 > &matrix, const Transform3D< T > &transform)
 Transform the specified matrix to object space with the inverse of the specified transformation. More...
 
template<typename T >
Ray3D< T > operator* (const Ray3D< T > &ray, const Transform3D< T > &transform)
 Transform the specified ray to object space with the inverse of the specified transformation. More...
 
template<typename T >
Plane3D< T > operator* (const Plane3D< T > &plane, const Transform3D< T > &transform)
 Transform the specified plane to object space with the inverse of the specified transformation. More...
 
template<typename T >
VectorND< T, 2 > operator+ (T value, const VectorND< T, 2 > &vector)
 Add a value to every component of the vector. More...
 
template<typename T >
VectorND< T, 2 > operator- (T value, const VectorND< T, 2 > &vector)
 Subtract every component of the vector from the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 2 > operator* (T value, const VectorND< T, 2 > &vector)
 Multiply every component of the vector with the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 2 > operator/ (T value, const VectorND< T, 2 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T >
dot (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute and return the dot product of two vectors. More...
 
template<typename T >
VectorND< T, 2 > perp (const VectorND< T, 2 > &vector)
 Return the "perp" product of a vector. More...
 
template<typename T >
VectorND< T, 2 > midpoint (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute the midpoint (e.g. average) of two vectors. More...
 
template<typename T >
VectorND< T, 2 > abs (const VectorND< T, 2 > &vector)
 Return the absolute value of the specified vector, such that the every component is positive. More...
 
template<typename T >
VectorND< T, 2 > min (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 2 > max (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 2 > floor (const VectorND< T, 2 > &vector)
 Return the floor of the specified vector, rounding each component down to the nearest integer. More...
 
template<typename T >
VectorND< T, 2 > ceiling (const VectorND< T, 2 > &vector)
 Return the floor of the specified vector, rounding each component up to the nearest integer. More...
 
template<typename T >
VectorND< T, 2 > mod (const VectorND< T, 2 > &vector, const T &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
VectorND< T, 2 > mod (const VectorND< T, 2 > &vector, const VectorND< T, 2 > &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
Bool isNAN (const VectorND< T, 2 > &vector)
 Return whether or not any component of this vector is Not-A-Number. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > operator+ (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Add a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > operator- (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Subtract a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > operator* (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Multiply every component of a vector with scalar, returning a vector result. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > operator/ (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T >
VectorND< T, 3 > operator+ (T value, const VectorND< T, 3 > &vector)
 Add a value to every component of the vector. More...
 
template<typename T >
VectorND< T, 3 > operator- (T value, const VectorND< T, 3 > &vector)
 Subtract every component of the vector from the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 3 > operator* (T value, const VectorND< T, 3 > &vector)
 Multiply every component of the vector with the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 3 > operator/ (T value, const VectorND< T, 3 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T >
dot (const VectorND< T, 3 > &vector1, const VectorND< T, 3 > &vector2)
 Compute and return the dot product of two vectors. More...
 
template<typename T >
VectorND< T, 3 > cross (const VectorND< T, 3 > &vector1, const VectorND< T, 3 > &vector2)
 Compute and return the cross product of two vectors. More...
 
template<typename T >
VectorND< T, 3 > midpoint (const VectorND< T, 3 > &vector1, const VectorND< T, 3 > &vector2)
 Compute the midpoint (e.g. average) of two vectors. More...
 
template<typename T >
VectorND< T, 3 > abs (const VectorND< T, 3 > &vector)
 Return the absolute value of the specified vector, such that the every component is positive. More...
 
template<typename T >
VectorND< T, 3 > min (const VectorND< T, 3 > &vector1, const VectorND< T, 3 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 3 > max (const VectorND< T, 3 > &vector1, const VectorND< T, 3 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 3 > floor (const VectorND< T, 3 > &vector)
 Return the floor of the specified vector, rounding each component down to the nearest integer. More...
 
template<typename T >
VectorND< T, 3 > ceiling (const VectorND< T, 3 > &vector)
 Return the floor of the specified vector, rounding each component up to the nearest integer. More...
 
template<typename T >
VectorND< T, 3 > mod (const VectorND< T, 3 > &vector, const T &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
VectorND< T, 3 > mod (const VectorND< T, 3 > &vector, const VectorND< T, 3 > &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
Bool isNAN (const VectorND< T, 3 > &vector)
 Return whether or not any component of this vector is Not-A-Number. More...
 
template<typename T >
VectorND< T, 3 > barycentric (const VectorND< T, 3 > &v1, const VectorND< T, 3 > &v2, const VectorND< T, 3 > &v3, const VectorND< T, 3 > &point)
 Compute and return the barycentric coordinates of a point relative to the given triangle vertices. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND< T, 3 > operator+ (T value, const Swizzle3D< T, dimension, i0, i1, i2 > &vector)
 Add a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND< T, 3 > operator- (T value, const Swizzle3D< T, dimension, i0, i1, i2 > &vector)
 Subtract a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND< T, 3 > operator* (T value, const Swizzle3D< T, dimension, i0, i1, i2 > &vector)
 Multiply every component of a vector with scalar, returning a vector result. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND< T, 3 > operator/ (T value, const Swizzle3D< T, dimension, i0, i1, i2 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T >
VectorND< T, 4 > operator+ (T value, const VectorND< T, 4 > &vector)
 Add a value to every component of the vector. More...
 
template<typename T >
VectorND< T, 4 > operator- (T value, const VectorND< T, 4 > &vector)
 Subtract every component of the vector from the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 4 > operator* (T value, const VectorND< T, 4 > &vector)
 Multiply every component of the vector with the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 4 > operator/ (T value, const VectorND< T, 4 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T >
dot (const VectorND< T, 4 > &vector1, const VectorND< T, 4 > &vector2)
 Compute and return the dot product of two vectors. More...
 
template<typename T >
VectorND< T, 4 > midpoint (const VectorND< T, 4 > &vector1, const VectorND< T, 4 > &vector2)
 Compute the midpoint (e.g. average) of two vectors. More...
 
template<typename T >
VectorND< T, 4 > abs (const VectorND< T, 4 > &vector)
 Return the absolute value of the specified vector, such that the every component is positive. More...
 
template<typename T >
VectorND< T, 4 > min (const VectorND< T, 4 > &vector1, const VectorND< T, 4 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 4 > max (const VectorND< T, 4 > &vector1, const VectorND< T, 4 > &vector2)
 Compute the component-wise maximum of two vectors. More...
 
template<typename T >
VectorND< T, 4 > floor (const VectorND< T, 4 > &vector)
 Return the floor of the specified vector, rounding each component down to the nearest integer. More...
 
template<typename T >
VectorND< T, 4 > ceiling (const VectorND< T, 4 > &vector)
 Return the floor of the specified vector, rounding each component up to the nearest integer. More...
 
template<typename T >
VectorND< T, 4 > mod (const VectorND< T, 4 > &vector, const T &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
VectorND< T, 4 > mod (const VectorND< T, 4 > &vector, const VectorND< T, 4 > &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
Bool isNAN (const VectorND< T, 4 > &vector)
 Return whether or not any component of this vector is Not-A-Number. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND< T, 4 > operator+ (T value, const Swizzle4D< T, dimension, i0, i1, i2, i3 > &vector)
 Add a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND< T, 4 > operator- (T value, const Swizzle4D< T, dimension, i0, i1, i2, i3 > &vector)
 Subtract a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND< T, 4 > operator* (T value, const Swizzle4D< T, dimension, i0, i1, i2, i3 > &vector)
 Multiply every component of a vector with scalar, returning a vector result. More...
 
template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND< T, 4 > operator/ (T value, const Swizzle4D< T, dimension, i0, i1, i2, i3 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T , Size dimension>
VectorND< T, dimension > operator* (const T &c, const VectorND< T, dimension > &vector)
 Multiply every component of a vector by a scalar value and return the resulting vector. More...
 
template<typename T , Size dimension>
VectorND< T, dimension > operator+ (const T &c, const VectorND< T, dimension > &vector)
 Multiply every component of a vector by a scalar value and return the resulting vector. More...
 
template<typename T , Size dimension>
dot (const VectorND< T, dimension > &v1, const VectorND< T, dimension > &v2)
 Return the dot product of two vectors. More...
 
template<typename T , Size dimension>
VectorND< T, dimension > midpoint (const VectorND< T, dimension > &v1, const VectorND< T, dimension > &v2)
 Return the midpoint of two vectors. More...
 

Detailed Description

A namespace containing classes and functions that do fast math operations.

Typedef Documentation

typedef MatrixND< int, 2, 2 > om::math::Matrix2i
typedef MatrixND< float, 2, 2 > om::math::Matrix2f
typedef MatrixND< double, 2, 2 > om::math::Matrix2d
typedef Plane2D< int > om::math::Plane2i
typedef Plane2D< float > om::math::Plane2f
typedef Plane2D< double > om::math::Plane2d
typedef Plane3D< int > om::math::Plane3i
typedef Plane3D< float > om::math::Plane3f
typedef Plane3D< double > om::math::Plane3d
typedef AABB1D<int> om::math::AABB1i
typedef AABB1D<float> om::math::AABB1f
typedef AABB1D<double> om::math::AABB1d
typedef AABB2D<int> om::math::AABB2i
typedef AABB2D<float> om::math::AABB2f
typedef AABB2D<double> om::math::AABB2d
typedef AABB3D<int> om::math::AABB3i
typedef AABB3D<float> om::math::AABB3f
typedef AABB3D<double> om::math::AABB3d
typedef MatrixND<int,3,3> om::math::Matrix3i
typedef MatrixND<float,3,3> om::math::Matrix3f
typedef MatrixND<double,3,3> om::math::Matrix3d
typedef MatrixND<int,4,4> om::math::Matrix4i
typedef MatrixND<float,4,4> om::math::Matrix4f
typedef MatrixND<double,4,4> om::math::Matrix4d
typedef VectorND<int,2> om::math::Vector2i
typedef VectorND<float,2> om::math::Vector2f
typedef VectorND<double,2> om::math::Vector2d
typedef VectorND<int,3> om::math::Vector3i
typedef VectorND<float,3> om::math::Vector3f
typedef VectorND<double,3> om::math::Vector3d
typedef VectorND<int,4> om::math::Vector4i
typedef VectorND<float,4> om::math::Vector4f
typedef VectorND<double,4> om::math::Vector4d
typedef Ray2D<int> om::math::Ray2i
typedef Ray2D<float> om::math::Ray2f
typedef Ray2D<double> om::math::Ray2d
typedef Ray3D<int> om::math::Ray3i
typedef Ray3D<float> om::math::Ray3f
typedef Ray3D<double> om::math::Ray3d
typedef Sphere2D<float> om::math::Sphere2f
typedef Sphere2D<double> om::math::Sphere2d
typedef Sphere3D<float> om::math::Sphere3f
typedef Sphere3D<double> om::math::Sphere3d

Function Documentation

template<typename T >
T om::math::sum ( const T *  array,
Size  number 
)
inline

Compute and return the sum of all of the values in the specified array.

template<>
Float32 om::math::sum ( const Float32 array,
Size  number 
)
template<>
Float64 om::math::sum ( const Float64 array,
Size  number 
)
template<typename T >
void om::math::add ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Add a scalar value to each entry in the destination array, storing the result.

template<>
void om::math::add ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::add ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::add ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::add ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T >
void om::math::add ( Complex< T > *  destination,
scalar,
Size  number 
)
inline
template<typename T , Size size>
void om::math::add ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::add ( MatrixND< T, size0, size1 > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::add ( T *  destination,
const T *  b,
Size  number 
)
inline

Add each entry of the second array to each entry in the destination array, storing the result.

template<>
void om::math::add ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::add ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::add ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::add ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T >
void om::math::add ( Complex< T > *  destination,
const Complex< T > *  b,
Size  number 
)
inline
template<typename T , Size size>
void om::math::add ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::add ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  b,
Size  number 
)
inline
template<typename T >
void om::math::add ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Add the entries of two arrays and store the result in the destination array.

template<>
void om::math::add ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::add ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::add ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::add ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<typename T >
void om::math::add ( Complex< T > *  destination,
const Complex< T > *  a,
const Complex< T > *  b,
Size  number 
)
inline
template<typename T , Size size>
void om::math::add ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::add ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  a,
const MatrixND< T, size0, size1 > *  b,
Size  number 
)
inline
template<typename T >
void om::math::add ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Add a scalar value to each entry in the destination array, storing the result.

template<>
void om::math::add ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::add ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::add ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::add ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T >
void om::math::add ( Complex< T > *  destination,
const Complex< T > *  a,
scalar,
Size  number 
)
inline
template<typename T , Size size>
void om::math::add ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::add ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::negate ( T *  destination,
Size  number 
)

Negate each element in the specified array, storing the result in the same array.

template<>
void om::math::negate ( Int32 destination,
Size  number 
)
template<>
void om::math::negate ( Int64 destination,
Size  number 
)
template<>
void om::math::negate ( Float32 destination,
Size  number 
)
template<>
void om::math::negate ( Float64 destination,
Size  number 
)
template<typename T >
void om::math::negate ( Complex< T > *  destination,
Size  number 
)
inline
template<typename T , Size size>
void om::math::negate ( VectorND< T, size > *  destination,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::negate ( MatrixND< T, size0, size1 > *  destination,
Size  number 
)
inline
template<typename T >
void om::math::negate ( T *  destination,
const T *  a,
Size  number 
)

Negate each element in an array, storing the result in a destination array.

template<>
void om::math::negate ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::negate ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::negate ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::negate ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T >
void om::math::negate ( Complex< T > *  destination,
const Complex< T > *  b,
Size  number 
)
inline
template<typename T , Size size>
void om::math::negate ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::negate ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  b,
Size  number 
)
inline
template<typename T >
void om::math::subtract ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Subtract a scalar from each element of the destination array, storing the result in the destination.

template<>
void om::math::subtract ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::subtract ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::subtract ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::subtract ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T >
void om::math::subtract ( Complex< T > *  destination,
scalar,
Size  number 
)
inline
template<typename T , Size size>
void om::math::subtract ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::subtract ( MatrixND< T, size0, size1 > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::subtract ( T *  destination,
const T *  b,
Size  number 
)
inline

Subtract each entry of the second array from the destination array and store the result in the destination.

template<>
void om::math::subtract ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::subtract ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::subtract ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::subtract ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T >
void om::math::subtract ( Complex< T > *  destination,
const Complex< T > *  b,
Size  number 
)
inline
template<typename T , Size size>
void om::math::subtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::subtract ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  b,
Size  number 
)
inline
template<typename T >
void om::math::subtract ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Subtract an array from another and store the result in the destination array.

template<>
void om::math::subtract ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::subtract ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::subtract ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::subtract ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<typename T >
void om::math::subtract ( Complex< T > *  destination,
const Complex< T > *  a,
const Complex< T > *  b,
Size  number 
)
inline
template<typename T , Size size>
void om::math::subtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::subtract ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  a,
const MatrixND< T, size0, size1 > *  b,
Size  number 
)
inline
template<typename T >
void om::math::subtract ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Subtract a scalar from an array and store the result in the destination array.

template<>
void om::math::subtract ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::subtract ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::subtract ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::subtract ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T >
void om::math::subtract ( Complex< T > *  destination,
const Complex< T > *  a,
scalar,
Size  number 
)
inline
template<typename T , Size size>
void om::math::subtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T , Size size0, Size size1>
void om::math::subtract ( MatrixND< T, size0, size1 > *  destination,
const MatrixND< T, size0, size1 > *  a,
scalar,
Size  number 
)
inline
template<typename T >
T om::math::product ( const T *  array,
Size  number 
)
inline

Compute and return the product of all of the values in the specified array.

template<>
Float32 om::math::product ( const Float32 array,
Size  number 
)
template<>
Float64 om::math::product ( const Float64 array,
Size  number 
)
template<typename T >
T om::math::norm ( const T *  array,
Size  number 
)
inline

Compute and return the euclidean norm (length) of the specified vector.

template<>
Float32 om::math::norm ( const Float32 array,
Size  number 
)
template<>
Float64 om::math::norm ( const Float64 array,
Size  number 
)
template<typename T >
T om::math::dot ( const T *  a,
const T *  b,
Size  number 
)
inline

Compute and return the dot product of the values in the two given arrays.

template<>
Float32 om::math::dot ( const Float32 a,
const Float32 b,
Size  number 
)
template<>
Float64 om::math::dot ( const Float64 a,
const Float64 b,
Size  number 
)
template<typename T >
void om::math::multiply ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Multiply each entry in the destination array by a scalar and store the result in the destination.

template<>
void om::math::multiply ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::multiply ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::multiply ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::multiply ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::multiply ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::multiply ( T *  destination,
const T *  b,
Size  number 
)
inline

Multiply each entry in the destination array by another array entry and store the result in the destination.

template<>
void om::math::multiply ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::multiply ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::multiply ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::multiply ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::multiply ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::multiply ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Multiply the elements in two arrays and store the result of each multiplication in the destination.

template<>
void om::math::multiply ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::multiply ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::multiply ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::multiply ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<>
void om::math::multiply ( Complex< Float32 > *  destination,
const Complex< Float32 > *  a,
const Complex< Float32 > *  b,
Size  number 
)
template<typename T , Size size>
void om::math::multiply ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::multiply ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Multiply the elements in an array by a scalar and store the result in the destination array.

template<>
void om::math::multiply ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::multiply ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::multiply ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::multiply ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::multiply ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::multiplyAdd ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Multiply each entry in the destination by a scalar, then add the result to the destination array entry.

template<>
void om::math::multiplyAdd ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::multiplyAdd ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::multiplyAdd ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::multiplyAdd ( T *  destination,
const T *  b,
Size  number 
)
inline

Multiply each entry in the destination by another array, then add the result to the destination entry.

template<>
void om::math::multiplyAdd ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::multiplyAdd ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::multiplyAdd ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Multiply the enties of two arrays and add the results to the destination array entries.

template<>
void om::math::multiplyAdd ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<>
void om::math::multiplyAdd ( Complex< Float32 > *  destination,
const Complex< Float32 > *  a,
const Complex< Float32 > *  b,
Size  number 
)
template<typename T , Size size>
void om::math::multiplyAdd ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::multiplyAdd ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Multiply the entries of an array by a scalar, then add the result to a destination array.

template<>
void om::math::multiplyAdd ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::multiplyAdd ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::multiplyAdd ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::multiplyAdd ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::multiplySubtract ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Multiply each entry in the destination by a scalar, then subtract the result from the destination array entry.

template<>
void om::math::multiplySubtract ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::multiplySubtract ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::multiplySubtract ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::multiplySubtract ( T *  destination,
const T *  b,
Size  number 
)
inline

Multiply each entry in the destination by another array, then subtract the result from the destination entry.

template<>
void om::math::multiplySubtract ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::multiplySubtract ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::multiplySubtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::multiplySubtract ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Multiply the enties of two arrays and subtract the results from the destination array entries.

template<>
void om::math::multiplySubtract ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::multiplySubtract ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::multiplySubtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::multiplySubtract ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Multiply the entries of an array by a scalar, then subtract the result from a destination array.

template<>
void om::math::multiplySubtract ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::multiplySubtract ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::multiplySubtract ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::multiplySubtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::divide ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Divide each entry in the destination array by a scalar and store the result in the destination.

template<>
void om::math::divide ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::divide ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::divide ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::divide ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::divide ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::divide ( T *  destination,
const T *  b,
Size  number 
)
inline

Divide each entry in the destination array by another array entry and store the result in the destination.

template<>
void om::math::divide ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::divide ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::divide ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::divide ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::divide ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::divide ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Divide the elements of one array by those in another and store the result in the destination.

template<>
void om::math::divide ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::divide ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::divide ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::divide ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::divide ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::divide ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Divide the elements in an array by a scalar and store the result in the destination array.

template<>
void om::math::divide ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::divide ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::divide ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::divide ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::divide ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::divideAdd ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Divide each entry in the destination by a scalar, then add the result to the destination array entry.

template<>
void om::math::divideAdd ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::divideAdd ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::divideAdd ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::divideAdd ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::divideAdd ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::divideAdd ( T *  destination,
const T *  b,
Size  number 
)
inline

Divide each entry in the destination by another array, then add the result to the destination entry.

template<>
void om::math::divideAdd ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::divideAdd ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::divideAdd ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::divideAdd ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::divideAdd ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::divideAdd ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Divide the enties of one array by another and add the results to the destination array entries.

template<>
void om::math::divideAdd ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::divideAdd ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::divideAdd ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::divideAdd ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::divideAdd ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::divideAdd ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Divide the entries of an array by a scalar, then add the result to a destination array.

template<>
void om::math::divideAdd ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::divideAdd ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::divideAdd ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::divideAdd ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::divideAdd ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::divideSubtract ( T *  destination,
const T &  scalar,
Size  number 
)
inline

Divide each entry in the destination by a scalar, then subtract the result from the destination array entry.

template<>
void om::math::divideSubtract ( Int32 destination,
const Int32 scalar,
Size  number 
)
template<>
void om::math::divideSubtract ( Int64 destination,
const Int64 scalar,
Size  number 
)
template<>
void om::math::divideSubtract ( Float32 destination,
const Float32 scalar,
Size  number 
)
template<>
void om::math::divideSubtract ( Float64 destination,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::divideSubtract ( VectorND< T, size > *  destination,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::divideSubtract ( T *  destination,
const T *  b,
Size  number 
)
inline

Divide each entry in the destination by another array, then subtract the result from the destination entry.

template<>
void om::math::divideSubtract ( Int32 destination,
const Int32 b,
Size  number 
)
template<>
void om::math::divideSubtract ( Int64 destination,
const Int64 b,
Size  number 
)
template<>
void om::math::divideSubtract ( Float32 destination,
const Float32 b,
Size  number 
)
template<>
void om::math::divideSubtract ( Float64 destination,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::divideSubtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::divideSubtract ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)
inline

Divide the enties of one array by another and subtract the results from the destination array entries.

template<>
void om::math::divideSubtract ( Int32 destination,
const Int32 a,
const Int32 b,
Size  number 
)
template<>
void om::math::divideSubtract ( Int64 destination,
const Int64 a,
const Int64 b,
Size  number 
)
template<>
void om::math::divideSubtract ( Float32 destination,
const Float32 a,
const Float32 b,
Size  number 
)
template<>
void om::math::divideSubtract ( Float64 destination,
const Float64 a,
const Float64 b,
Size  number 
)
template<typename T , Size size>
void om::math::divideSubtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
const VectorND< T, size > *  b,
Size  number 
)
inline
template<typename T >
void om::math::divideSubtract ( T *  destination,
const T *  a,
const T &  scalar,
Size  number 
)
inline

Divide the entries of an array by a scalar, then subtract the result from a destination array.

template<>
void om::math::divideSubtract ( Int32 destination,
const Int32 a,
const Int32 scalar,
Size  number 
)
template<>
void om::math::divideSubtract ( Int64 destination,
const Int64 a,
const Int64 scalar,
Size  number 
)
template<>
void om::math::divideSubtract ( Float32 destination,
const Float32 a,
const Float32 scalar,
Size  number 
)
template<>
void om::math::divideSubtract ( Float64 destination,
const Float64 a,
const Float64 scalar,
Size  number 
)
template<typename T , Size size>
void om::math::divideSubtract ( VectorND< T, size > *  destination,
const VectorND< T, size > *  a,
scalar,
Size  number 
)
inline
template<typename T >
void om::math::abs ( T *  destination,
Size  number 
)
inline

Compute the absolute value of each entry in an array and store the result in the same array.

template<>
void om::math::abs ( Int32 destination,
Size  number 
)
template<>
void om::math::abs ( Float32 destination,
Size  number 
)
template<>
void om::math::abs ( Float64 destination,
Size  number 
)
template<typename T >
void om::math::abs ( T *  destination,
const T *  a,
Size  number 
)
inline

Compute the absolute value of each entry in an array and store the result in the destination array.

template<>
void om::math::abs ( Int32 destination,
const Int32 a,
Size  number 
)
template<>
void om::math::abs ( Float32 destination,
const Float32 a,
Size  number 
)
template<>
void om::math::abs ( Float64 destination,
const Float64 a,
Size  number 
)
template<typename T >
void om::math::sqrt ( T *  destination,
Size  number 
)
inline

Compute the square root of each entry in an array and store the result in the same array.

template<>
void om::math::sqrt ( Int32 destination,
Size  number 
)
template<>
void om::math::sqrt ( Float32 destination,
Size  number 
)
template<>
void om::math::sqrt ( Float64 destination,
Size  number 
)
template<typename T >
void om::math::sqrt ( T *  destination,
const T *  a,
Size  number 
)
inline

Compute the square root of each entry in an array and store the result in the destination array.

template<>
void om::math::sqrt ( Int32 destination,
const Int32 a,
Size  number 
)
template<>
void om::math::sqrt ( Float32 destination,
const Float32 a,
Size  number 
)
template<>
void om::math::sqrt ( Float64 destination,
const Float64 a,
Size  number 
)
template<typename T >
void om::math::floor ( T *  destination,
Size  number 
)
inline

Compute the floor of each entry in an array and store the result in the same array.

template<>
void om::math::floor ( Float32 destination,
Size  number 
)
template<>
void om::math::floor ( Float64 destination,
Size  number 
)
template<typename T >
void om::math::floor ( T *  destination,
const T *  a,
Size  number 
)
inline

Compute the floor of each entry in an array and store the result in the destination array.

template<>
void om::math::floor ( Float32 destination,
const Float32 a,
Size  number 
)
template<>
void om::math::floor ( Float64 destination,
const Float64 a,
Size  number 
)
template<typename T >
void om::math::ceiling ( T *  destination,
Size  number 
)
inline

Compute the ceiling of each entry in an array and store the result in the same array.

template<>
void om::math::ceiling ( Float32 destination,
Size  number 
)
template<>
void om::math::ceiling ( Float64 destination,
Size  number 
)
template<typename T >
void om::math::ceiling ( T *  destination,
const T *  a,
Size  number 
)
inline

Compute the ceiling of each entry in an array and store the result in the destination array.

template<>
void om::math::ceiling ( Float32 destination,
const Float32 a,
Size  number 
)
template<>
void om::math::ceiling ( Float64 destination,
const Float64 a,
Size  number 
)
template<typename T >
void om::math::min ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)

Find the smaller of each pair of entries in two arrays and store the result in the destination.

template<typename T >
T om::math::min ( const T *  array,
Size  number 
)

Compute and return the minimum value in the specified array.

template<typename T >
void om::math::max ( T *  destination,
const T *  a,
const T *  b,
Size  number 
)

Find the larger of each pair of entries in two arrays and store the result in the destination.

template<typename T >
T om::math::max ( const T *  array,
Size  number 
)

Compute and return the maximum value in the specified array.

template<typename T >
Bool om::math::operator== ( value,
const Complex< T > &  complex 
)
inline

Return whether or not a r number is equal to a complex number.

template<typename T >
Bool om::math::operator!= ( value,
const Complex< T > &  complex 
)
inline

Return whether or not a r number is not equal to a complex number.

template<typename T >
Complex<T> om::math::operator+ ( value,
const Complex< T > &  complex 
)
inline

Add a complex number to a r number and return the resulting complex number.

template<typename T >
Complex<T> om::math::operator- ( value,
const Complex< T > &  complex 
)
inline

Subtract a complex number from a r number and return the resulting complex number.

template<typename T >
Complex<T> om::math::operator* ( value,
const Complex< T > &  complex 
)
inline

Multiply a r number by a complex number and return the resulting complex number.

template<typename T >
Complex<T> om::math::operator/ ( value,
const Complex< T > &  complex 
)
inline

Divide a r number by a complex number and return the resulting complex number.

template<typename T >
T om::math::abs ( const Complex< T > &  complex)
inline

Return the absolute value (magnitude) of the specified complex number.

template<typename T >
Bool om::math::convolve ( const T *  input,
Size  inputSize,
const T *  filter,
Size  filterSize,
T *  output 
)

Convolve the specified input signal with the given filter kernel.

The results of the transform are stored in the output data array which must have space for (inputSize + fiterSize - 1) elements.

This is a direct convolution algorithm and should realistically only be used for offline computation or for short filter lengths.

The method returns whether or not the convolution was successfully performed. The method may fail if any pointer is NULL or if the filter size is 0.

void om::math::fft ( Complex< Float32 > *  inOut,
Size  size 
)

Convert N complex values to N complex values in-place using the forward transform.

void om::math::ifft ( Complex< Float32 > *  inOut,
Size  size 
)

Convert N complex values to N complex values using the reverse transform.

void om::math::fft ( Float32 inOut,
Size  size 
)

Convert N real float values to N/2+1 complex values in place.

void om::math::fft ( const Float32 input,
Complex< Float32 > *  output,
Size  size 
)

Convert N real float values to N/2+1 complex values.

void om::math::ifft ( Float32 inOut,
Size  size 
)

Convert N/2+1 complex values to N real float values in place.

void om::math::ifft ( const Complex< Float32 > *  input,
Float32 output,
Size  size 
)

Convert N/2+1 complex values to N real float values.

void om::math::fftShift ( Complex< Float32 > *  data,
Size  size 
)

Shift the zero-frequency components of the specified array to the center of the array.

This can be useful when visualizing the output of an FFT.

The method return whether or not the operation was successful. It may fail if the data pointer is NULL or if the size is not divisible by 2.

template<typename T >
Bool om::math::fft2D ( Complex< T > *  data,
Size  width,
Size  height 
)

Compute the forward 2D Fourier transform in-place on the specified array of complex numbers.

The input data should be stored in a row-major format, with each row representing a contiguous block of complex numbers. The results of the transform are stored in the input data array.

The method returns whether or not the FFT was successfully performed on the input data. The method may fail if the data pointer is NULL or if the requested FFT width or height is not a power of two.

template<typename T >
Bool om::math::ifft2D ( Complex< T > *  data,
Size  width,
Size  height 
)

Compute the inverse 2D Fourier transform in-place on the specified array of complex numbers.

The input data should be stored in a row-major format, with each row representing a contiguous block of complex numbers. The results of the transform are stored in the input data array.

The method returns whether or not the FFT was successfully performed on the input data. The method may fail if the data pointer is NULL or if the requested FFT width or height is not a power of two.

template<typename T >
Bool om::math::fftShift2D ( Complex< T > *  data,
Size  width,
Size  height 
)

Shift the zero-frequency components of the specified 2D matrix to the center of the matrix.

This can be useful when visualizing the output of an FFT.

The method return whether or not the operation was successful. It may fail if the data pointer is NULL or if the width or height are not divisible by 2.

template<typename T , typename BaseType , Size fractionalBits>
Bool om::math::operator== ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Bool om::math::operator!= ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Bool om::math::operator<= ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Bool om::math::operator>= ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Bool om::math::operator< ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Bool om::math::operator> ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Fixed<BaseType,fractionalBits> om::math::operator+ ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Fixed<BaseType,fractionalBits> om::math::operator- ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Fixed<BaseType,fractionalBits> om::math::operator* ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
Fixed<BaseType,fractionalBits> om::math::operator/ ( a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
T& om::math::operator+= ( T &  a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
T& om::math::operator-= ( T &  a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
T& om::math::operator*= ( T &  a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T , typename BaseType , Size fractionalBits>
T& om::math::operator/= ( T &  a,
const Fixed< BaseType, fractionalBits > &  b 
)
inline
template<typename T >
Matrix<T> om::math::operator+ ( const T &  c,
const Matrix< T > &  matrix 
)
inline

Add a scalar to a matrix's elements and return the resulting matrix.

template<typename T >
Matrix<T> om::math::operator- ( const T &  c,
const Matrix< T > &  matrix 
)
inline

Subtract a matrix's elements from a scalar and return the resulting matrix.

template<typename T >
Matrix<T> om::math::operator* ( const T &  c,
const Matrix< T > &  matrix 
)
inline

Multiply a matrix's elements by a scalar and return the resulting matrix.

template<typename T >
Bool om::math::leastSquares ( const Matrix< T > &  A,
const Matrix< T > &  b,
Matrix< T > &  x 
)
inline

Use a least-squares algorithm to find the best fitting solution for a linear system A*x = b.

template<typename T >
Bool om::math::solve ( const Matrix< T > &  A,
const Matrix< T > &  b,
Matrix< T > &  x 
)
inline

Solve a linear system of the form A*x = b., returning whether or not it was able to be solved.

If there is no direct solution (e.g. the input matrix A is not invertible), then the least squares solution is computed instead and the method returns FALSE. Otherwise the exact solution is computed and TRUE is returned.

template<typename T >
void om::math::qr ( const Matrix< T > &  A,
Matrix< T > &  Q,
Matrix< T > &  R 
)
inline

Factorize a matrix A into the product A = Q*R, where Q is orthornormal and R is upper-triangular.

The method computes the QR factorization without column pivoting.

template<typename T >
void om::math::qr ( const Matrix< T > &  A,
Matrix< T > &  Q,
Matrix< T > &  R,
Matrix< Index > &  permutation 
)
inline

Factorize a matrix A into the product A = Q*R, where Q is orthornormal and R is upper-triangular.

The method uses column pivoting to compute the QR factorization with improved robustness and numerical stability. The permutation of the columns of matrix A is returned, such that permutation(A) = Q*R.

template<typename T >
void om::math::lu ( const Matrix< T > &  matrix,
Matrix< T > &  L,
Matrix< T > &  U 
)
template<typename T >
VectorND<T,2> om::math::operator* ( const VectorND< T, 2 > &  vector,
const MatrixND< T, 2, 2 > &  matrix 
)
inline

'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose.

template<typename T >
MatrixND<T,2,2> om::math::operator* ( const T &  value,
const MatrixND< T, 2, 2 > &  matrix 
)
inline

Multiply a matrix's elements by a scalar and return the resulting matrix.

template<typename T >
MatrixND<T,2,2> om::math::operator+ ( const T &  value,
const MatrixND< T, 2, 2 > &  matrix 
)
inline

Add a scalar to the elements of a matrix and return the resulting matrix.

template<typename T >
MatrixND<T,2,2> om::math::abs ( const MatrixND< T, 2, 2 > &  matrix)
inline

Return the absolute value of the specified matrix, such that the every component is positive.

template<typename T >
MatrixND<T,3,3> om::math::operator+ ( const T &  value,
const MatrixND< T, 3, 3 > &  matrix 
)
inline

Add a sclar value to a matrix's elements and return the resulting matrix.

template<typename T >
VectorND<T,3> om::math::operator* ( const VectorND< T, 3 > &  vector,
const MatrixND< T, 3, 3 > &  matrix 
)
inline

'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose.

template<typename T >
MatrixND<T,3,3> om::math::operator* ( const T &  value,
const MatrixND< T, 3, 3 > &  matrix 
)
inline

Multiply a matrix's elements by a scalar and return the resulting matrix.

template<typename T >
MatrixND<T,3,3> om::math::abs ( const MatrixND< T, 3, 3 > &  matrix)
inline

Return the absolute value of the specified matrix, such that the every component is positive.

template<typename T >
VectorND<T,3> om::math::eulerXYZ ( const MatrixND< T, 3, 3 > &  m)
inline

Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in XYZ order.

template<typename T >
VectorND<T,3> om::math::eulerXZY ( const MatrixND< T, 3, 3 > &  m)
inline

Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in XZY order.

template<typename T >
VectorND<T,3> om::math::eulerYXZ ( const MatrixND< T, 3, 3 > &  m)
inline

Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in YXZ order.

template<typename T >
VectorND<T,3> om::math::eulerYZX ( const MatrixND< T, 3, 3 > &  m)
inline

Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in YZX order.

template<typename T >
VectorND<T,3> om::math::eulerZXY ( const MatrixND< T, 3, 3 > &  m)
inline

Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in ZXY order.

template<typename T >
VectorND<T,3> om::math::eulerZYX ( const MatrixND< T, 3, 3 > &  m)
inline

Return the euler angles for an orthonormal rotation matrix when the euler angles are composed in ZYX order.

template<class T >
MatrixND<T,4,4> om::math::operator+ ( const T &  value,
const MatrixND< T, 4, 4 > &  matrix 
)
inline

Add a sclar value to a matrix's elements and return the resulting matrix.

template<typename T >
VectorND<T,4> om::math::operator* ( const VectorND< T, 4 > &  vector,
const MatrixND< T, 4, 4 > &  matrix 
)
inline

'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose.

template<class T >
MatrixND<T,4,4> om::math::operator* ( const T &  value,
const MatrixND< T, 4, 4 > &  matrix 
)
inline

Multiply a matrix's elements by a scalar and return the resulting matrix.

template<typename T >
MatrixND<T,4,4> om::math::abs ( const MatrixND< T, 4, 4 > &  matrix)
inline

Return the absolute value of the specified matrix, such that the every component is positive.

template<typename T , Size numRows, Size numColumns>
MatrixND<T,numRows,numColumns> om::math::operator+ ( const T &  c,
const MatrixND< T, numRows, numColumns > &  matrix 
)
inline

Multiply a matrix's elements by a scalar and return the resulting matrix.

template<typename T , Size numRows, Size numColumns>
VectorND<T,numColumns> om::math::operator* ( const VectorND< T, numRows > &  vector,
const MatrixND< T, numRows, numColumns > &  matrix 
)
inline

'Reverse' multiply a vector/point by matrix: multiply it by the matrix's transpose.

template<typename T , Size numRows, Size numColumns>
MatrixND<T,numRows,numColumns> om::math::operator* ( const T &  c,
const MatrixND< T, numRows, numColumns > &  matrix 
)
inline

Multiply a matrix's elements by a scalar and return the resulting matrix.

template<typename T >
T om::math::nextPowerOf2Prime ( value)

Return a prime number larger than the specified value, but smaller than the next power of two.

template<>
unsigned int om::math::nextPowerOf2Prime ( unsigned int  value)
template<>
unsigned long om::math::nextPowerOf2Prime ( unsigned long  value)
template<>
unsigned long long om::math::nextPowerOf2Prime ( unsigned long long  value)
template<typename T >
Quaternion4D<T> om::math::operator* ( const T &  value,
const Quaternion4D< T > &  quaternion 
)
inline

Multiply every component of the quaternion with the value, returning a quaternion result.

This operator multiplies every component of the 2nd paramter, a quaternion, from the 1st paramter, a value, and then returns a quaternion containing the resulting quaternional components. This operator does not modify the orignal quaternion.

Parameters
value- The value to multiply with all components of the quaternion.
quaternion- The quaternion to be multiplied with.
Returns
The resulting quaternion of this multiplication.
template<typename T >
T om::math::dot ( const Quaternion4D< T > &  q1,
const Quaternion4D< T > &  q2 
)
inline

Compute and return the dot product of two quaternions.

This method adds all components of the component-wise multiplication of the two quaternions together and returns the scalar result. It does not modify either of the original quaternions. If the dot product is zero, then the two quaternions are perpendicular.

Parameters
q1- The first quaternion of the dot product.
q2- The second quaternion of the dot product.
Returns
The dot product of the two quaternion parameters.
template<typename T >
Quaternion4D<T> om::math::slerp ( const Quaternion4D< T > &  q1,
const Quaternion4D< T > &  q2,
a 
)
inline

Use spherical linear interpolation to interpolate two quaternions.

template<typename T >
T om::math::random ( )
inline
template<typename T >
T om::math::random ( min,
max 
)
inline
template<typename T >
void om::math::setRandomSeed ( newSeed)
inline
template<typename T , typename U >
Bool om::math::resample ( const T *  input,
Size  inputSize,
T *  output,
factor,
Size  filterWidth,
filterFactor = U(0.499) 
)

Resample the input data by the given factor and put the result in the output.

The output array must have enough space to hold ceiling(inputSize*factor) elements.

This is a slow implementation that should not be used for performance-intensive applications or where a stream of data must be resampled.

template<typename T >
T om::math::pi ( )
inline
template<typename T >
T om::math::e ( )
inline
template<typename T >
T om::math::nan ( )
inline

Return the Not-A-Number representation for the templated type, or zero if it has none.

template<typename T >
T om::math::infinity ( )
inline

Return the Infinity representation for the templated type, or the maximum value if it has none.

template<typename T >
T om::math::negativeInfinity ( )
inline

Return the Negative Infinity representation for the templated type, or the minimum value if it has none.

template<>
unsigned char om::math::negativeInfinity< unsigned char > ( )
inline

Return the Negative Infinity representation for the templated type, or the minimum value if it has none.

template<>
unsigned short om::math::negativeInfinity< unsigned short > ( )
inline

Return the Negative Infinity representation for the templated type, or the minimum value if it has none.

template<>
unsigned int om::math::negativeInfinity< unsigned int > ( )
inline

Return the Negative Infinity representation for the templated type, or the minimum value if it has none.

template<>
unsigned long om::math::negativeInfinity< unsigned long > ( )
inline

Return the Negative Infinity representation for the templated type, or the minimum value if it has none.

template<>
unsigned long long om::math::negativeInfinity< unsigned long long > ( )
inline

Return the Negative Infinity representation for the templated type, or the minimum value if it has none.

template<typename T >
T om::math::max ( )
inline

Return the maximum allowable finite value for the template parameter type.

template<typename T >
T om::math::min ( )
inline

Return the minimum allowable finite value for the template parameter type.

template<>
float om::math::min< float > ( )
inline

Return the minimum allowable finite value for the template parameter type.

template<>
double om::math::min< double > ( )
inline

Return the minimum allowable finite value for the template parameter type.

template<typename T >
T om::math::minPositive ( )
inline

Return the smallest normalized positive value for the template parameter type.

template<typename T >
T om::math::epsilon ( )
inline

Return the smallest deviation from the value 1 that the templated type can represent.

template<>
float om::math::epsilon ( )
inline

Return the smallest deviation from the value 1 that a float can represent.

template<>
double om::math::epsilon ( )
inline

Return the smallest deviation from the value 1 that a double can represent.

template<typename T >
bool om::math::isInfinity ( number)
inline

Return whether a number is equal to the representation of Infinity for its type.

template<typename T >
bool om::math::isNegativeInfinity ( number)
inline

Return whether a number is equal to the representation of Negative Infinity for its type.

template<>
bool om::math::isNegativeInfinity ( unsigned char  number)
inline
template<>
bool om::math::isNegativeInfinity ( unsigned short  number)
inline
template<>
bool om::math::isNegativeInfinity ( unsigned int  number)
inline
template<>
bool om::math::isNegativeInfinity ( unsigned long  number)
inline
template<>
bool om::math::isNegativeInfinity ( unsigned long long  number)
inline
template<typename T >
bool om::math::isInfinite ( number)
inline

Return whether a number is equal to Negative or Positive Infinity for its type.

template<typename T >
bool om::math::isFinite ( number)
inline

Return whether a number is finite.

template<typename T >
bool om::math::isNAN ( number)
inline

Return whether or not the specified number is Not-A-Number.

template<>
bool om::math::isNAN ( float  number)
inline
template<>
bool om::math::isNAN ( double  number)
inline
template<typename T >
bool om::math::isInteger ( )
inline
template<>
bool om::math::isInteger< char > ( )
inline
template<>
bool om::math::isInteger< unsigned char > ( )
inline
template<>
bool om::math::isInteger< short > ( )
inline
template<>
bool om::math::isInteger< unsigned short > ( )
inline
template<>
bool om::math::isInteger< int > ( )
inline
template<>
bool om::math::isInteger< unsigned int > ( )
inline
template<>
bool om::math::isInteger< long > ( )
inline
template<>
bool om::math::isInteger< unsigned long > ( )
inline
template<>
bool om::math::isInteger< long long > ( )
inline
template<>
bool om::math::isInteger< unsigned long long > ( )
inline
template<typename T >
bool om::math::isInteger ( number)
inline
template<typename T >
bool om::math::isFloatingPoint ( )
inline
template<>
bool om::math::isFloatingPoint< float > ( )
inline
template<>
bool om::math::isFloatingPoint< double > ( )
inline
template<typename T >
bool om::math::isFloatingPoint ( number)
inline
template<typename T >
T om::math::abs ( number)
inline

Return the absolute value of the specified number, such that the result is positive.

template<>
float om::math::abs ( float  number)
inline
template<>
double om::math::abs ( double  number)
inline
template<>
unsigned char om::math::abs ( unsigned char  value)
inline
template<>
unsigned short om::math::abs ( unsigned short  value)
inline
template<>
unsigned int om::math::abs ( unsigned int  value)
inline
template<>
unsigned long om::math::abs ( unsigned long  value)
inline
template<>
unsigned long long om::math::abs ( unsigned long long  value)
inline
template<typename T >
T om::math::sign ( number)
inline

Return -1 if the number is less than zero, 0 if it is zero, and 1 otherwise.

template<>
unsigned char om::math::sign ( unsigned char  value)
inline
template<>
unsigned short om::math::sign ( unsigned short  value)
inline
template<>
unsigned int om::math::sign ( unsigned int  value)
inline
template<>
unsigned long om::math::sign ( unsigned long  value)
inline
template<>
unsigned long long om::math::sign ( unsigned long long  value)
inline
template<typename T >
bool om::math::equals ( value1,
value2 
)
inline
template<>
bool om::math::equals ( float  value1,
float  value2 
)
inline
template<>
bool om::math::equals ( double  value1,
double  value2 
)
inline
template<typename T >
bool om::math::fuzzyEquals ( value1,
value2,
epsilon 
)
inline
template<typename T >
bool om::math::isZero ( value,
epsilon 
)
inline
template<typename T >
bool om::math::isZero ( value)
inline
template<>
bool om::math::isZero ( float  value)
inline
template<>
bool om::math::isZero ( double  value)
inline
template<typename T >
T om::math::average ( value1,
value2 
)
inline
template<>
float om::math::average ( float  value1,
float  value2 
)
inline
template<>
double om::math::average ( double  value1,
double  value2 
)
inline
template<typename T >
T om::math::max ( value1,
value2 
)
inline

Return the larger of two numbers.

template<typename T >
T om::math::min ( value1,
value2 
)
inline

Return the smaller of two numbers.

template<typename T >
T om::math::clamp ( number,
minimum,
maximum 
)
inline

Return the result when the a number is constrainted to the interval [minimum, maximum].

template<typename T >
T om::math::floor ( number)
inline

Return the largest whole number smaller than the number parameter, as the same type.

template<>
float om::math::floor ( float  number)
inline
template<>
double om::math::floor ( double  number)
inline
template<typename T >
T om::math::ceiling ( number)
inline
template<>
float om::math::ceiling ( float  number)
inline
template<>
double om::math::ceiling ( double  number)
inline
template<typename T >
T om::math::round ( value)
inline
template<>
float om::math::round ( float  value)
inline
template<>
double om::math::round ( double  value)
inline
template<typename T >
T om::math::sqrti ( value)
inline
template<typename T >
T om::math::sqrt ( value)
inline
template<>
float om::math::sqrt ( float  value)
inline
template<>
double om::math::sqrt ( double  value)
inline
template<typename T >
T om::math::previousMultiple ( number,
base 
)
inline

Get the previous multiple of a base that is less than or equal to a specified number.

template<typename T >
T om::math::nextMultiple ( number,
base 
)
inline

Get the next multiple of a base that is greater than or equal to a specified number.

template<typename T >
T om::math::nearestMultiple ( number,
base 
)
inline

Get the multiple of a base that the closest to a specified number.

template<typename T >
T om::math::nextPowerOfTwo ( x)
inline

Return the first power of two larger than the specified number.

template<>
char om::math::nextPowerOfTwo ( char  x)
inline

Return the first power of two larger than the specified number.

template<>
unsigned char om::math::nextPowerOfTwo ( unsigned char  x)
inline

Return the first power of two larger than the specified number.

template<>
short om::math::nextPowerOfTwo ( short  x)
inline

Return the first power of two larger than the specified number.

template<>
unsigned short om::math::nextPowerOfTwo ( unsigned short  x)
inline

Return the first power of two larger than the specified number.

template<>
int om::math::nextPowerOfTwo ( int  x)
inline

Return the first power of two larger than the specified number.

template<>
unsigned int om::math::nextPowerOfTwo ( unsigned int  x)
inline

Return the first power of two larger than the specified number.

template<>
long om::math::nextPowerOfTwo ( long  x)
inline

Return the first power of two larger than the specified number.

template<>
unsigned long om::math::nextPowerOfTwo ( unsigned long  x)
inline

Return the first power of two larger than the specified number.

template<>
long long om::math::nextPowerOfTwo ( long long  x)
inline

Return the first power of two larger than the specified number.

template<>
unsigned long long om::math::nextPowerOfTwo ( unsigned long long  x)
inline

Return the first power of two larger than the specified number.

template<typename T >
Bool om::math::isPowerOfTwo ( number)
inline

Return whether or not the specified number is a power of 2.

template<typename T , typename U >
T om::math::pow ( base,
power 
)
inline
template<>
char om::math::pow ( char  base,
char  power 
)
inline
template<>
unsigned char om::math::pow ( unsigned char  base,
unsigned char  power 
)
inline
template<>
short om::math::pow ( short  base,
short  power 
)
inline
template<>
unsigned short om::math::pow ( unsigned short  base,
unsigned short  power 
)
inline
template<>
int om::math::pow ( int  base,
int  power 
)
inline
template<>
unsigned int om::math::pow ( unsigned int  base,
unsigned int  power 
)
inline
template<>
long om::math::pow ( long  base,
long  power 
)
inline
template<>
unsigned long om::math::pow ( unsigned long  base,
unsigned long  power 
)
inline
template<>
long long om::math::pow ( long long  base,
long long  power 
)
inline
template<>
unsigned long long om::math::pow ( unsigned long long  base,
unsigned long long  power 
)
inline
template<typename T >
T om::math::square ( value)
inline
template<typename T >
T om::math::ln ( value)
inline
template<typename T >
T om::math::log10 ( value)
inline
template<>
short om::math::log10 ( short  value)
inline
template<>
unsigned short om::math::log10 ( unsigned short  value)
inline
template<>
int om::math::log10 ( int  value)
inline
template<>
unsigned int om::math::log10 ( unsigned int  value)
inline
template<>
long om::math::log10 ( long  value)
inline
template<>
unsigned long om::math::log10 ( unsigned long  value)
inline
template<>
long long om::math::log10 ( long long  value)
inline
template<>
unsigned long long om::math::log10 ( unsigned long long  value)
inline
template<typename T >
T om::math::log ( value,
base 
)
inline
template<>
float om::math::log ( float  value,
float  base 
)
inline
template<typename T >
T om::math::log2 ( value)
inline
template<>
float om::math::log2 ( float  value)
inline
template<>
double om::math::log2 ( double  value)
inline
template<typename T >
T om::math::bitCount ( bits)
inline
template<>
UInt32 om::math::bitCount ( UInt32  bits)
inline
template<>
UInt64 om::math::bitCount ( UInt64  bits)
inline
template<typename T >
T om::math::firstSetBit ( bits)
inline
template<>
UInt32 om::math::firstSetBit ( UInt32  bits)
inline
template<>
UInt64 om::math::firstSetBit ( UInt64  bits)
inline
template<typename T >
T om::math::lastSetBit ( bits)
inline
template<>
UInt32 om::math::lastSetBit ( UInt32  bits)
inline
template<>
UInt64 om::math::lastSetBit ( UInt64  bits)
inline
template<typename T >
T om::math::mod ( value,
divisor 
)
inline

Compute the remainder when the specified value is divided by the given divisor.

template<>
float om::math::mod ( float  value,
float  divisor 
)
inline

Compute the remainder when the specified value is divided by the given divisor.

template<>
double om::math::mod ( double  value,
double  divisor 
)
inline

Compute the remainder when the specified value is divided by the given divisor.

float om::math::radiansToDegrees ( float  number)
inline
double om::math::radiansToDegrees ( double  number)
inline
float om::math::degreesToRadians ( float  number)
inline
double om::math::degreesToRadians ( double  number)
inline
template<typename T >
T om::math::linearToDB ( linear)
inline

Convert the specfied linear ratio to a logarithmic ratio in decibels.

template<typename T >
T om::math::dbToLinear ( db)
inline

Convert the specfied logarithmic ratio in decibels to a linear ratio.

template<typename T >
T om::math::sec ( value)
inline

Compute and return the secant of the specified value.

template<typename T >
T om::math::csc ( value)
inline

Compute and return the cosecant of the specified value.

template<typename T >
T om::math::cot ( value)
inline

Compute and return the cotangent of the specified value.

template<typename T >
T om::math::sech ( value)
inline

Compute and return the secant of the specified value.

template<typename T >
T om::math::csch ( value)
inline

Compute and return the cosecant of the specified value.

template<typename T >
T om::math::coth ( value)
inline

Compute and return the cotangent of the specified value.

template<typename T >
T om::math::asinh ( value)
inline

Compute and return the inverse hyperbolic sine of the specified value.

template<typename T >
T om::math::acosh ( value)
inline

Compute and return the inverse hyperbolic cosine of the specified value.

template<typename T >
T om::math::atanh ( value)
inline

Compute and return the inverse hyperbolic tangent of the specified value.

template<typename T >
T om::math::asech ( value)
inline

Compute and return the inverse hyperbolic secant of the specified value.

template<typename T >
T om::math::acsch ( value)
inline

Compute and return the inverse hyperbolic cosecant of the specified value.

template<typename T >
T om::math::acoth ( value)
inline

Compute and return the inverse hyperbolic cotangent of the specified value.

template<>
void om::math::ScalarType::check< lang::Float16 > ( )
inline
template<typename T , Size width>
SIMDArray<T,width> om::math::operator+ ( const T &  value,
const SIMDArray< T, width > &  scalar 
)
inline

Add a scalar value to each component of this scalar and return the resulting scalar.

template<typename T , Size width>
SIMDArray<T,width> om::math::operator- ( const T &  value,
const SIMDArray< T, width > &  scalar 
)
inline

Subtract a scalar value from each component of this scalar and return the resulting scalar.

template<typename T , Size width>
SIMDArray<T,width> om::math::operator* ( const T &  value,
const SIMDArray< T, width > &  scalar 
)
inline

Multiply a scalar value by each component of this scalar and return the resulting scalar.

template<typename T , Size width>
SIMDArray<T,width> om::math::operator/ ( const T &  value,
const SIMDArray< T, width > &  scalar 
)
inline

Divide each component of this scalar by a scalar value and return the resulting scalar.

template<typename T , Size width>
SIMDArray<T,width> om::math::abs ( const SIMDArray< T, width > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

template<typename T , Size width>
SIMDArray<T,width> om::math::sqrt ( const SIMDArray< T, width > &  scalar)
inline

Compute the square root of each component of the specified SIMD scalar and return the result.

template<typename T , Size width>
SIMDArray<T,width> om::math::min ( const SIMDArray< T, width > &  scalar1,
const SIMDArray< T, width > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

template<typename T , Size width>
SIMDArray<T,width> om::math::max ( const SIMDArray< T, width > &  scalar1,
const SIMDArray< T, width > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::operator+ ( const Float32  value,
const SIMDArray< Float32, width > &  scalar 
)
inline

Add a scalar value to each component of this scalar and return the resulting scalar.

template<Size width>
SIMDArray<Float32,width> om::math::operator- ( const Float32  value,
const SIMDArray< Float32, width > &  scalar 
)
inline

Subtract a scalar value from each component of this scalar and return the resulting scalar.

template<Size width>
SIMDArray<Float32,width> om::math::operator* ( const Float32  value,
const SIMDArray< Float32, width > &  scalar 
)
inline

Multiply a scalar value by each component of this scalar and return the resulting scalar.

template<Size width>
SIMDArray<Float32,width> om::math::operator/ ( const Float32  value,
const SIMDArray< Float32, width > &  scalar 
)
inline

Divide each component of this scalar by a scalar value and return the resulting scalar.

template<Size width>
SIMDArray<Float32,width> om::math::abs ( const SIMDArray< Float32, width > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::ceiling ( const SIMDArray< Float32, width > &  scalar)
inline

Compute the ceiling of each component of the specified SIMD scalar and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::floor ( const SIMDArray< Float32, width > &  scalar)
inline

Compute the floor of each component of the specified SIMD scalar and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::sqrt ( const SIMDArray< Float32, width > &  scalar)
inline

Compute the square root of each component of the specified SIMD scalar and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::min ( const SIMDArray< Float32, width > &  scalar1,
const SIMDArray< Float32, width > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::max ( const SIMDArray< Float32, width > &  scalar1,
const SIMDArray< Float32, width > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

template<Size width>
SIMDArray<Float32,width> om::math::select ( const SIMDArray< Int32, width > &  selector,
const SIMDArray< Float32, width > &  scalar1,
const SIMDArray< Float32, width > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

template<Size width>
SIMDArray<Float32,width> om::math::ln ( const SIMDArray< Float32, width > &  scalar)
inline

Compute and return the natural logarithm of the specified vector.

template<Size width>
SIMDArray<Float32,width> om::math::log10 ( const SIMDArray< Float32, width > &  scalar)
inline

Compute and return the base-10 logarithm of the specified vector.

template<Size width>
SIMDArray<Float32,width> om::math::sin ( const SIMDArray< Float32, width > &  scalar)
inline

Compute and return the sine of the specified vector.

template<Size width>
SIMDArray<Float32,width> om::math::cos ( const SIMDArray< Float32, width > &  scalar)
inline

Compute and return the cosine of the specified vector.

template<Size width>
SIMDArray<Int32,width> om::math::operator+ ( const Int32  value,
const SIMDArray< Int32, width > &  scalar 
)
inline

Add a scalar value to each component of this scalar and return the resulting scalar.

template<Size width>
SIMDArray<Int32,width> om::math::operator- ( const Int32  value,
const SIMDArray< Int32, width > &  scalar 
)
inline

Subtract a scalar value from each component of this scalar and return the resulting scalar.

template<Size width>
SIMDArray<Int32,width> om::math::operator* ( const Int32  value,
const SIMDArray< Int32, width > &  scalar 
)
inline

Multiply a scalar value by each component of this scalar and return the resulting scalar.

template<Size width>
SIMDArray<Int32,width> om::math::operator/ ( const Int32  value,
const SIMDArray< Int32, width > &  scalar 
)
inline

Divide each component of this scalar by a scalar value and return the resulting scalar.

template<Size width>
SIMDArray<Int32,width> om::math::abs ( const SIMDArray< Int32, width > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

template<Size width>
SIMDArray<Int32,width> om::math::sqrt ( const SIMDArray< Int32, width > &  scalar)
inline

Compute the square root of each component of the specified SIMD scalar and return the result.

template<Size width>
SIMDArray<Int32,width> om::math::min ( const SIMDArray< Int32, width > &  scalar1,
const SIMDArray< Int32, width > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

template<Size width>
SIMDArray<Int32,width> om::math::max ( const SIMDArray< Int32, width > &  scalar1,
const SIMDArray< Int32, width > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

template<Size width>
SIMDArray<Int32,width> om::math::select ( const SIMDArray< Int32, width > &  selector,
const SIMDArray< Int32, width > &  scalar1,
const SIMDArray< Int32, width > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

template<typename T , Size width>
SIMDScalar<T,width> om::math::operator+ ( const T  value,
const SIMDScalar< T, width > &  scalar 
)
inline

Add a scalar value to each component of this scalar and return the resulting scalar.

template<typename T , Size width>
SIMDScalar<T,width> om::math::operator- ( const Float32  value,
const SIMDScalar< T, width > &  scalar 
)
inline

Subtract a scalar value from each component of this scalar and return the resulting scalar.

template<typename T , Size width>
SIMDScalar<T,width> om::math::operator* ( const Float32  value,
const SIMDScalar< T, width > &  scalar 
)
inline

Multiply a scalar value by each component of this scalar and return the resulting scalar.

template<typename T , Size width>
SIMDScalar<T,width> om::math::operator/ ( const Float32  value,
const SIMDScalar< T, width > &  scalar 
)
inline

Divide each component of this scalar by a scalar value and return the resulting scalar.

SIMDScalar<Float32,4> om::math::abs ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

SIMDScalar<Float32,4> om::math::ceiling ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Compute the ceiling of each component of the specified SIMD scalar and return the result.

This method is emulated in software on x86 platforms where SSE 4.1 is not available.

SIMDScalar<Float32,4> om::math::floor ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Compute the floor of each component of the specified SIMD scalar and return the result.

This method is emulated in software on x86 platforms where SSE 4.1 is not available.

SIMDScalar<Float32,4> om::math::sqrt ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Compute the square root of each component of the specified SIMD scalar and return the result.

SIMDScalar<Float32,4> om::math::reciprocal ( const SIMDScalar< Float32, 4 > &  v)
inline

Return an approximate reciprocal of the specified value with 23 bits of precision.

SIMDScalar<Float32,4> om::math::reciprocalSqrt ( const SIMDScalar< Float32, 4 > &  v)
inline

Return an approximate reciprocal square root of the specified value with 23 bits of precision.

template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar<Float32,4> om::math::shuffle ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Pick 4 elements from the specified SIMD scalar and return the result.

template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar<Float32,4> om::math::shuffle ( const SIMDScalar< Float32, 4 > &  scalar1,
const SIMDScalar< Float32, 4 > &  scalar2 
)
inline

Pick two elements from each SIMD scalar and return the result.

SIMDScalar<Float32,4> om::math::select ( const SIMDScalar< Int32, 4 > &  selector,
const SIMDScalar< Float32, 4 > &  scalar1,
const SIMDScalar< Float32, 4 > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

SIMDScalar<Float32,4> om::math::lows ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Copy the first and third element of the specified SIMD scalar into the second and fourth places.

SIMDScalar<Float32,4> om::math::highs ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Copy the second and fourth element of the specified SIMD scalar into the first and third places.

SIMDScalar<Float32,4> om::math::subAdd ( const SIMDScalar< Float32, 4 > &  scalar1,
const SIMDScalar< Float32, 4 > &  scalar2 
)
inline

Subtract the first and third elements and add the second and fourth.

SIMDScalar<Float32,4> om::math::min ( const SIMDScalar< Float32, 4 > &  scalar1,
const SIMDScalar< Float32, 4 > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Float32,4> om::math::max ( const SIMDScalar< Float32, 4 > &  scalar1,
const SIMDScalar< Float32, 4 > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Float32,4> om::math::min ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Compute the minimum component of the specified SIMD scalar and return the wide result.

SIMDScalar<Float32,4> om::math::max ( const SIMDScalar< Float32, 4 > &  scalar)
inline

Compute the maximum component of the specified SIMD scalar and return the wide result.

SIMDScalar<Float32,4> om::math::cross ( const SIMDScalar< Float32, 4 > &  v1,
const SIMDScalar< Float32, 4 > &  v2 
)
inline

Return the 3D cross product of two vectors, where each vector has the form (x,y,z,0).

SIMDScalar<Float32,4> om::math::dot ( const SIMDScalar< Float32, 4 > &  v1,
const SIMDScalar< Float32, 4 > &  v2 
)
inline

Return the dot product of two vectors.

SIMDScalar<Float32,4> om::math::normalize ( const SIMDScalar< Float32, 4 > &  v)
inline

Normalize the specified vector using a fast approximate algorithm, accurate to ~23 bits.

SIMDScalar<Float32,4> om::math::ln ( const SIMDScalar< Float32, 4 > &  v)
inline

Compute and return the natural logarithm of the specified vector.

SIMDScalar<Float32,4> om::math::log10 ( const SIMDScalar< Float32, 4 > &  v)
inline

Compute and return the base-10 logarithm of the specified vector.

SIMDScalar<Float32,4> om::math::sin ( const SIMDScalar< Float32, 4 > &  v)
inline

Compute and return the sine of the specified vector.

SIMDScalar<Float32,4> om::math::cos ( const SIMDScalar< Float32, 4 > &  v)
inline

Compute and return the cosine of the specified vector.

SIMDScalar<Float64,2> om::math::abs ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

SIMDScalar<Float64,2> om::math::ceiling ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Compute the ceiling of each component of the specified SIMD scalar and return the result.

This method is emulated in software on x86 platforms where SSE 4.1 is not available.

SIMDScalar<Float64,2> om::math::floor ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Compute the floor of each component of the specified SIMD scalar and return the result.

This method is emulated in software on x86 platforms where SSE 4.1 is not available.

SIMDScalar<Float64,2> om::math::sqrt ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Compute the square root of each component of the specified SIMD scalar and return the result.

template<UInt i1, UInt i2>
SIMDScalar<Float64,2> om::math::shuffle ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Pick 2 elements from the specified SIMD scalar and return the result.

template<UInt i1, UInt i2>
SIMDScalar<Float64,2> om::math::shuffle ( const SIMDScalar< Float64, 2 > &  scalar1,
const SIMDScalar< Float64, 2 > &  scalar2 
)
inline

Pick one element from each SIMD scalar and return the result.

SIMDScalar<Float64,2> om::math::select ( const SIMDScalar< Int64, 2 > &  selector,
const SIMDScalar< Float64, 2 > &  scalar1,
const SIMDScalar< Float64, 2 > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

SIMDScalar<Float64,2> om::math::subAdd ( const SIMDScalar< Float64, 2 > &  scalar1,
const SIMDScalar< Float64, 2 > &  scalar2 
)
inline

Subtract the first and third elements and add the second and fourth.

SIMDScalar<Float64,2> om::math::min ( const SIMDScalar< Float64, 2 > &  scalar1,
const SIMDScalar< Float64, 2 > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Float64,2> om::math::max ( const SIMDScalar< Float64, 2 > &  scalar1,
const SIMDScalar< Float64, 2 > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Float64,2> om::math::min ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Compute the minimum component of the specified SIMD scalar and return the wide result.

SIMDScalar<Float64,2> om::math::max ( const SIMDScalar< Float64, 2 > &  scalar)
inline

Compute the maximum component of the specified SIMD scalar and return the wide result.

SIMDScalar<Int16,8> om::math::abs ( const SIMDScalar< Int16, 8 > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

SIMDScalar<Int16,8> om::math::min ( const SIMDScalar< Int16, 8 > &  scalar1,
const SIMDScalar< Int16, 8 > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Int16,8> om::math::max ( const SIMDScalar< Int16, 8 > &  scalar1,
const SIMDScalar< Int16, 8 > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Int16,8> om::math::select ( const SIMDScalar< Int16, 8 > &  selector,
const SIMDScalar< Int16, 8 > &  scalar1,
const SIMDScalar< Int16, 8 > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

SIMDScalar<Int32,4> om::math::abs ( const SIMDScalar< Int32, 4 > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

SIMDScalar<Int32,4> om::math::min ( const SIMDScalar< Int32, 4 > &  scalar1,
const SIMDScalar< Int32, 4 > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Int32,4> om::math::max ( const SIMDScalar< Int32, 4 > &  scalar1,
const SIMDScalar< Int32, 4 > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar<Int32,4> om::math::shuffle ( const SIMDScalar< Int32, 4 > &  scalar)
inline

Pick 4 elements from the specified SIMD scalar and return the result.

template<UInt i1, UInt i2, UInt i3, UInt i4>
SIMDScalar<Int32,4> om::math::shuffle ( const SIMDScalar< Int32, 4 > &  scalar1,
const SIMDScalar< Int32, 4 > &  scalar2 
)
inline

Pick two elements from each SIMD scalar and return the result.

SIMDScalar<Int32,4> om::math::select ( const SIMDScalar< Int32, 4 > &  selector,
const SIMDScalar< Int32, 4 > &  scalar1,
const SIMDScalar< Int32, 4 > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

SIMDScalar<Int32,4> om::math::lows ( const SIMDScalar< Int32, 4 > &  scalar)
inline

Copy the first and third element of the specified SIMD scalar into the second and fourth places.

SIMDScalar<Int32,4> om::math::highs ( const SIMDScalar< Int32, 4 > &  scalar)
inline

Copy the second and fourth element of the specified SIMD scalar into the first and third places.

SIMDScalar<Int64,2> om::math::abs ( const SIMDScalar< Int64, 2 > &  scalar)
inline

Compute the absolute value of each component of the specified SIMD scalar and return the result.

SIMDScalar<Int64,2> om::math::min ( const SIMDScalar< Int64, 2 > &  scalar1,
const SIMDScalar< Int64, 2 > &  scalar2 
)
inline

Compute the minimum of each component of the specified SIMD scalars and return the result.

SIMDScalar<Int64,2> om::math::max ( const SIMDScalar< Int64, 2 > &  scalar1,
const SIMDScalar< Int64, 2 > &  scalar2 
)
inline

Compute the maximum of each component of the specified SIMD scalars and return the result.

template<UInt i1, UInt i2>
SIMDScalar<Int64,2> om::math::shuffle ( const SIMDScalar< Int64, 2 > &  scalar)
inline

Pick 2 elements from the specified SIMD scalar and return the result.

template<UInt i1, UInt i2>
SIMDScalar<Int64,2> om::math::shuffle ( const SIMDScalar< Int64, 2 > &  scalar1,
const SIMDScalar< Int64, 2 > &  scalar2 
)
inline

Pick one element from each SIMD scalar and return the result.

SIMDScalar<Int64,2> om::math::select ( const SIMDScalar< Int64, 2 > &  selector,
const SIMDScalar< Int64, 2 > &  scalar1,
const SIMDScalar< Int64, 2 > &  scalar2 
)
inline

Select elements from the first SIMD scalar if the selector is TRUE, otherwise from the second.

template<typename T , Size width>
SIMDScalar<T,width> om::math::dot ( const SIMDVector3D< T, width > &  vector1,
const SIMDVector3D< T, width > &  vector2 
)
inline

Compute and return the dot product of two SIMD 3D vectors.

This method performs N standard dot product operations for a SIMD width of N values per register and returns the result as an N-wide SIMD scalar.

Parameters
vector1- The first SIMD 3D vector of the dot product.
vector2- The second SIMD 3D vector of the dot product.
Returns
The dot products of the two vector parameters.
template<typename T , Size width>
SIMDVector3D<T,width> om::math::cross ( const SIMDVector3D< T, width > &  vector1,
const SIMDVector3D< T, width > &  vector2 
)
inline

Compute and return the cross product of two SIMD 3D vectors.

This method performs N standard cross product operations for a SIMD width of N values per register and returns the result as a SIMD 3D vector which contains the results of all cross products.

Parameters
vector1- The first SIMD 3D vector of the cross product.
vector2- The second SIMD 3D vector of the cross product.
Returns
The cross product vectors of the two vector parameters.
template<typename T >
T om::math::dot ( const SHExpansion< T > &  sh1,
const SHExpansion< T > &  sh2 
)
inline

Compute the dot product of the specified spherical harmonic expansions.

Bool om::math::add ( Tensor tensor1,
const Tensor tensor2 
)

Add a tensor to another tensor, modifying the first tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are mismatched.

Bool om::math::add ( Tensor result,
const Tensor tensor1,
const Tensor tensor2 
)

Add two tensors, storing the result in a third tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are mismatched.

Bool om::math::subtract ( Tensor tensor1,
const Tensor tensor2 
)

Add a tensor to another tensor, modifying the first tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are mismatched.

Bool om::math::subtract ( Tensor result,
const Tensor tensor1,
const Tensor tensor2 
)

Add two tensors, storing the result in a third tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are mismatched.

Bool om::math::multiply ( Tensor tensor1,
const Tensor tensor2 
)

Add a tensor to another tensor, modifying the first tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::multiply ( Tensor result,
const Tensor tensor1,
const Tensor tensor2 
)

Add two tensors, storing the result in a third tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::multiplyScalars ( Tensor tensor1,
const Tensor tensor2 
)

Add a tensor to another tensor, modifying the first tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::multiplyScalars ( Tensor result,
const Tensor tensor1,
const Tensor tensor2 
)

Add two tensors, storing the result in a third tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::divide ( Tensor tensor1,
const Tensor tensor2 
)

Add a tensor to another tensor, modifying the first tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::divide ( Tensor result,
const Tensor tensor1,
const Tensor tensor2 
)

Add two tensors, storing the result in a third tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::divideScalars ( Tensor tensor1,
const Tensor tensor2 
)

Add a tensor to another tensor, modifying the first tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::divideScalars ( Tensor result,
const Tensor tensor1,
const Tensor tensor2 
)

Add two tensors, storing the result in a third tensor.

The method returns whether or not the operation was successful. The method can fail if the operand tensor dimensions are invalid.

Bool om::math::lu ( const Tensor A,
Tensor L,
Tensor U 
)

Compute the LU factorization of an input matrix A returning the L and U matrices in the output parameters.

Bool om::math::qr ( const Tensor A,
Tensor Q,
Tensor R 
)

Do a QR factorization of the specified matrix, returning the Q and R matrices in the output parameters.

R is an upper-triangular matrix, Q is an orthonormal (unitary) matrix. The matrix A can be formed by the matrix product Q*R.

Bool om::math::leastSquares ( const Tensor A,
const Tensor b,
Tensor x 
)

Use a least-squares algorithm to find the best fitting solution for a linear system A*x = b.

Bool om::math::solve ( const Tensor A,
const Tensor b,
Tensor x 
)

Solve a linear system A*x = b, returning whether or not it was able to be solved.

Bool om::math::invert ( const Tensor A,
Tensor inverse 
)

Compute the inverse of the matrix A, returning whether or not it was able to be inverted.

template<>
void om::math::TensorType::check< lang::Float16 > ( )
inline
template<>
void om::math::TensorType::check< VectorND< lang::Float16, 2 > > ( )
inline
template<>
void om::math::TensorType::check< VectorND< lang::Float16, 3 > > ( )
inline
template<>
void om::math::TensorType::check< VectorND< lang::Float16, 4 > > ( )
inline
template<>
void om::math::TensorType::check< Quaternion4D< lang::Float16 > > ( )
inline
template<>
void om::math::TensorType::check< MatrixND< lang::Float16, 2, 2 > > ( )
inline
template<>
TensorType om::math::TensorType::of< MatrixND< lang::Float16, 2, 2 > > ( )
inline
template<>
void om::math::TensorType::check< MatrixND< lang::Float16, 3, 3 > > ( )
inline
template<>
TensorType om::math::TensorType::of< MatrixND< lang::Float16, 3, 3 > > ( )
inline
template<>
void om::math::TensorType::check< MatrixND< lang::Float16, 4, 4 > > ( )
inline
template<>
TensorType om::math::TensorType::of< MatrixND< lang::Float16, 4, 4 > > ( )
inline
template<typename T >
T om::math::operator* ( value,
const Transform2D< T > &  transform 
)
inline

Scale the specified scalar value to object space with the inverse of the specified transformation.

template<typename T >
VectorND<T,2> om::math::operator* ( const VectorND< T, 2 > &  vector,
const Transform2D< T > &  transform 
)
inline

Transform the specified vector to object space with the inverse of the specified transformation.

template<typename T >
MatrixND<T,2,2> om::math::operator* ( const MatrixND< T, 2, 2 > &  matrix,
const Transform2D< T > &  transform 
)
inline

Transform the specified matrix to object space with the inverse of the specified transformation.

template<typename T >
Ray2D<T> om::math::operator* ( const Ray2D< T > &  ray,
const Transform2D< T > &  transform 
)
inline

Transform the specified ray to object space with the inverse of the specified transformation.

template<typename T >
Plane2D<T> om::math::operator* ( const Plane2D< T > &  plane,
const Transform2D< T > &  transform 
)
inline

Transform the specified plane to object space with the inverse of the specified transformation.

template<typename T >
T om::math::operator* ( value,
const Transform3D< T > &  transform 
)
inline

Scale the specified scalar value to object space with the inverse of the specified transformation.

template<typename T >
VectorND<T,3> om::math::operator* ( const VectorND< T, 2 > &  vector,
const Transform3D< T > &  transform 
)
inline

Transform the specified vector to object space with the inverse of the specified transformation.

template<typename T >
MatrixND<T,3,3> om::math::operator* ( const MatrixND< T, 2, 2 > &  matrix,
const Transform3D< T > &  transform 
)
inline

Transform the specified matrix to object space with the inverse of the specified transformation.

template<typename T >
Ray3D<T> om::math::operator* ( const Ray3D< T > &  ray,
const Transform3D< T > &  transform 
)
inline

Transform the specified ray to object space with the inverse of the specified transformation.

template<typename T >
Plane3D<T> om::math::operator* ( const Plane3D< T > &  plane,
const Transform3D< T > &  transform 
)
inline

Transform the specified plane to object space with the inverse of the specified transformation.

template<typename T >
VectorND<T,2> om::math::operator+ ( value,
const VectorND< T, 2 > &  vector 
)
inline

Add a value to every component of the vector.

template<typename T >
VectorND<T,2> om::math::operator- ( value,
const VectorND< T, 2 > &  vector 
)
inline

Subtract every component of the vector from the value, returning a vector result.

template<typename T >
VectorND<T,2> om::math::operator* ( value,
const VectorND< T, 2 > &  vector 
)
inline

Multiply every component of the vector with the value, returning a vector result.

template<typename T >
VectorND<T,2> om::math::operator/ ( value,
const VectorND< T, 2 > &  vector 
)
inline

Divide a value by every component of the vector, returning a vector result.

template<typename T >
T om::math::dot ( const VectorND< T, 2 > &  vector1,
const VectorND< T, 2 > &  vector2 
)
inline

Compute and return the dot product of two vectors.

template<typename T >
VectorND<T,2> om::math::perp ( const VectorND< T, 2 > &  vector)
inline

Return the "perp" product of a vector.

This method computes and returns a vector representing the perp product of the input vector. The result is perpendicular to the original vector and with the same length.

template<typename T >
VectorND<T,2> om::math::midpoint ( const VectorND< T, 2 > &  vector1,
const VectorND< T, 2 > &  vector2 
)
inline

Compute the midpoint (e.g. average) of two vectors.

template<typename T >
VectorND<T,2> om::math::abs ( const VectorND< T, 2 > &  vector)
inline

Return the absolute value of the specified vector, such that the every component is positive.

template<typename T >
VectorND<T,2> om::math::min ( const VectorND< T, 2 > &  vector1,
const VectorND< T, 2 > &  vector2 
)
inline

Compute the component-wise minimum of two vectors.

template<typename T >
VectorND<T,2> om::math::max ( const VectorND< T, 2 > &  vector1,
const VectorND< T, 2 > &  vector2 
)
inline

Compute the component-wise minimum of two vectors.

template<typename T >
VectorND<T,2> om::math::floor ( const VectorND< T, 2 > &  vector)
inline

Return the floor of the specified vector, rounding each component down to the nearest integer.

template<typename T >
VectorND<T,2> om::math::ceiling ( const VectorND< T, 2 > &  vector)
inline

Return the floor of the specified vector, rounding each component up to the nearest integer.

template<typename T >
VectorND<T,2> om::math::mod ( const VectorND< T, 2 > &  vector,
const T &  modulus 
)
inline

Return the component-wise modulus of the specified vector.

template<typename T >
VectorND<T,2> om::math::mod ( const VectorND< T, 2 > &  vector,
const VectorND< T, 2 > &  modulus 
)
inline

Return the component-wise modulus of the specified vector.

template<typename T >
Bool om::math::isNAN ( const VectorND< T, 2 > &  vector)
inline

Return whether or not any component of this vector is Not-A-Number.

template<typename T , Index dimension, Index i0, Index i1>
VectorND<T,2> om::math::operator+ ( value,
const Swizzle2D< T, dimension, i0, i1 > &  vector 
)
inline

Add a scalar to every component of the vector.

template<typename T , Index dimension, Index i0, Index i1>
VectorND<T,2> om::math::operator- ( value,
const Swizzle2D< T, dimension, i0, i1 > &  vector 
)
inline

Subtract a scalar to every component of the vector.

template<typename T , Index dimension, Index i0, Index i1>
VectorND<T,2> om::math::operator* ( value,
const Swizzle2D< T, dimension, i0, i1 > &  vector 
)
inline

Multiply every component of a vector with scalar, returning a vector result.

template<typename T , Index dimension, Index i0, Index i1>
VectorND<T,2> om::math::operator/ ( value,
const Swizzle2D< T, dimension, i0, i1 > &  vector 
)
inline

Divide a value by every component of the vector, returning a vector result.

template<typename T >
VectorND<T,3> om::math::operator+ ( value,
const VectorND< T, 3 > &  vector 
)
inline

Add a value to every component of the vector.

template<typename T >
VectorND<T,3> om::math::operator- ( value,
const VectorND< T, 3 > &  vector 
)
inline

Subtract every component of the vector from the value, returning a vector result.

template<typename T >
VectorND<T,3> om::math::operator* ( value,
const VectorND< T, 3 > &  vector 
)
inline

Multiply every component of the vector with the value, returning a vector result.

template<typename T >
VectorND<T,3> om::math::operator/ ( value,
const VectorND< T, 3 > &  vector 
)
inline

Divide a value by every component of the vector, returning a vector result.

template<typename T >
T om::math::dot ( const VectorND< T, 3 > &  vector1,
const VectorND< T, 3 > &  vector2 
)
inline

Compute and return the dot product of two vectors.

template<typename T >
VectorND<T,3> om::math::cross ( const VectorND< T, 3 > &  vector1,
const VectorND< T, 3 > &  vector2 
)
inline

Compute and return the cross product of two vectors.

template<typename T >
VectorND<T,3> om::math::midpoint ( const VectorND< T, 3 > &  vector1,
const VectorND< T, 3 > &  vector2 
)
inline

Compute the midpoint (e.g. average) of two vectors.

template<typename T >
VectorND<T,3> om::math::abs ( const VectorND< T, 3 > &  vector)
inline

Return the absolute value of the specified vector, such that the every component is positive.

template<typename T >
VectorND<T,3> om::math::min ( const VectorND< T, 3 > &  vector1,
const VectorND< T, 3 > &  vector2 
)
inline

Compute the component-wise minimum of two vectors.

template<typename T >
VectorND<T,3> om::math::max ( const VectorND< T, 3 > &  vector1,
const VectorND< T, 3 > &  vector2 
)
inline

Compute the component-wise minimum of two vectors.

template<typename T >
VectorND<T,3> om::math::floor ( const VectorND< T, 3 > &  vector)
inline

Return the floor of the specified vector, rounding each component down to the nearest integer.

template<typename T >
VectorND<T,3> om::math::ceiling ( const VectorND< T, 3 > &  vector)
inline

Return the floor of the specified vector, rounding each component up to the nearest integer.

template<typename T >
VectorND<T,3> om::math::mod ( const VectorND< T, 3 > &  vector,
const T &  modulus 
)
inline

Return the component-wise modulus of the specified vector.

template<typename T >
VectorND<T,3> om::math::mod ( const VectorND< T, 3 > &  vector,
const VectorND< T, 3 > &  modulus 
)
inline

Return the component-wise modulus of the specified vector.

template<typename T >
Bool om::math::isNAN ( const VectorND< T, 3 > &  vector)
inline

Return whether or not any component of this vector is Not-A-Number.

template<typename T >
VectorND<T,3> om::math::barycentric ( const VectorND< T, 3 > &  v1,
const VectorND< T, 3 > &  v2,
const VectorND< T, 3 > &  v3,
const VectorND< T, 3 > &  point 
)
inline

Compute and return the barycentric coordinates of a point relative to the given triangle vertices.

The projection of the point into the triangle's plane should lie within the triangle.

template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND<T,3> om::math::operator+ ( value,
const Swizzle3D< T, dimension, i0, i1, i2 > &  vector 
)
inline

Add a scalar to every component of the vector.

template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND<T,3> om::math::operator- ( value,
const Swizzle3D< T, dimension, i0, i1, i2 > &  vector 
)
inline

Subtract a scalar to every component of the vector.

template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND<T,3> om::math::operator* ( value,
const Swizzle3D< T, dimension, i0, i1, i2 > &  vector 
)
inline

Multiply every component of a vector with scalar, returning a vector result.

template<typename T , Index dimension, Index i0, Index i1, Index i2>
VectorND<T,3> om::math::operator/ ( value,
const Swizzle3D< T, dimension, i0, i1, i2 > &  vector 
)
inline

Divide a value by every component of the vector, returning a vector result.

template<typename T >
VectorND<T,4> om::math::operator+ ( value,
const VectorND< T, 4 > &  vector 
)
inline

Add a value to every component of the vector.

template<typename T >
VectorND<T,4> om::math::operator- ( value,
const VectorND< T, 4 > &  vector 
)
inline

Subtract every component of the vector from the value, returning a vector result.

template<typename T >
VectorND<T,4> om::math::operator* ( value,
const VectorND< T, 4 > &  vector 
)
inline

Multiply every component of the vector with the value, returning a vector result.

template<typename T >
VectorND<T,4> om::math::operator/ ( value,
const VectorND< T, 4 > &  vector 
)
inline

Divide a value by every component of the vector, returning a vector result.

template<typename T >
T om::math::dot ( const VectorND< T, 4 > &  vector1,
const VectorND< T, 4 > &  vector2 
)
inline

Compute and return the dot product of two vectors.

template<typename T >
VectorND<T,4> om::math::midpoint ( const VectorND< T, 4 > &  vector1,
const VectorND< T, 4 > &  vector2 
)
inline

Compute the midpoint (e.g. average) of two vectors.

template<typename T >
VectorND<T,4> om::math::abs ( const VectorND< T, 4 > &  vector)
inline

Return the absolute value of the specified vector, such that the every component is positive.

template<typename T >
VectorND<T,4> om::math::min ( const VectorND< T, 4 > &  vector1,
const VectorND< T, 4 > &  vector2 
)
inline

Compute the component-wise minimum of two vectors.

template<typename T >
VectorND<T,4> om::math::max ( const VectorND< T, 4 > &  vector1,
const VectorND< T, 4 > &  vector2 
)
inline

Compute the component-wise maximum of two vectors.

template<typename T >
VectorND<T,4> om::math::floor ( const VectorND< T, 4 > &  vector)
inline

Return the floor of the specified vector, rounding each component down to the nearest integer.

template<typename T >
VectorND<T,4> om::math::ceiling ( const VectorND< T, 4 > &  vector)
inline

Return the floor of the specified vector, rounding each component up to the nearest integer.

template<typename T >
VectorND<T,4> om::math::mod ( const VectorND< T, 4 > &  vector,
const T &  modulus 
)
inline

Return the component-wise modulus of the specified vector.

template<typename T >
VectorND<T,4> om::math::mod ( const VectorND< T, 4 > &  vector,
const VectorND< T, 4 > &  modulus 
)
inline

Return the component-wise modulus of the specified vector.

template<typename T >
Bool om::math::isNAN ( const VectorND< T, 4 > &  vector)
inline

Return whether or not any component of this vector is Not-A-Number.

template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND<T,4> om::math::operator+ ( value,
const Swizzle4D< T, dimension, i0, i1, i2, i3 > &  vector 
)
inline

Add a scalar to every component of the vector.

template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND<T,4> om::math::operator- ( value,
const Swizzle4D< T, dimension, i0, i1, i2, i3 > &  vector 
)
inline

Subtract a scalar to every component of the vector.

template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND<T,4> om::math::operator* ( value,
const Swizzle4D< T, dimension, i0, i1, i2, i3 > &  vector 
)
inline

Multiply every component of a vector with scalar, returning a vector result.

template<typename T , Index dimension, Index i0, Index i1, Index i2, Index i3>
VectorND<T,4> om::math::operator/ ( value,
const Swizzle4D< T, dimension, i0, i1, i2, i3 > &  vector 
)
inline

Divide a value by every component of the vector, returning a vector result.

template<typename T , Size dimension>
VectorND<T,dimension> om::math::operator* ( const T &  c,
const VectorND< T, dimension > &  vector 
)
inline

Multiply every component of a vector by a scalar value and return the resulting vector.

template<typename T , Size dimension>
VectorND<T,dimension> om::math::operator+ ( const T &  c,
const VectorND< T, dimension > &  vector 
)
inline

Multiply every component of a vector by a scalar value and return the resulting vector.

template<typename T , Size dimension>
T om::math::dot ( const VectorND< T, dimension > &  v1,
const VectorND< T, dimension > &  v2 
)
inline

Return the dot product of two vectors.

template<typename T , Size dimension>
VectorND<T,dimension> om::math::midpoint ( const VectorND< T, dimension > &  v1,
const VectorND< T, dimension > &  v2 
)
inline

Return the midpoint of two vectors.