Mathter
A configurable 3D math library for game developers.
Namespaces | Functions
VectorArithmetic.hpp File Reference
#include "VectorImpl.hpp"

Go to the source code of this file.

Namespaces

 mathter
 

Functions

template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator* (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise (Hadamard) vector product. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator/ (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise vector division. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator+ (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise vector addition. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator- (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise vector subtraction. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator*= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise (Hadamard) vector product. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator/= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise vector division. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator+= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise vector addition. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator-= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs)
 Elementwise vector subtraction. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator*= (Vector< T, Dim, Packed > &lhs, T rhs)
 Scales the vector by rhs . More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator/= (Vector< T, Dim, Packed > &lhs, T rhs)
 Scales the vector by 1/rhs . More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator+= (Vector< T, Dim, Packed > &lhs, T rhs)
 Adds rhs to each element of the vector. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > & mathter::operator-= (Vector< T, Dim, Packed > &lhs, T rhs)
 Subtracts rhs from each element of the vector. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator* (const Vector< T, Dim, Packed > &lhs, T rhs)
 Scales the vector by rhs . More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator/ (const Vector< T, Dim, Packed > &lhs, T rhs)
 Scales the vector by 1/rhs . More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator+ (const Vector< T, Dim, Packed > &lhs, T rhs)
 Adds rhs to each element of the vector. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator- (const Vector< T, Dim, Packed > &lhs, T rhs)
 Subtracts rhs from each element of the vector. More...
 
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
Vector< T, Dim, Packed > mathter::operator* (U lhs, const Vector< T, Dim, Packed > &rhs)
 Scales vector by lhs . More...
 
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
Vector< T, Dim, Packed > mathter::operator+ (U lhs, const Vector< T, Dim, Packed > &rhs)
 Adds lhs to all elements of the vector. More...
 
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
Vector< T, Dim, Packed > mathter::operator- (U lhs, const Vector< T, Dim, Packed > &rhs)
 Makes a vector with lhs as all elements, then subtracts rhs from it. More...
 
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type>
Vector< T, Dim, Packed > mathter::operator/ (U lhs, const Vector< T, Dim, Packed > &rhs)
 Makes a vector with lhs as all elements, then divides it by rhs . More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::MultiplyAdd (const Vector< T, Dim, Packed > &a, const Vector< T, Dim, Packed > &b, const Vector< T, Dim, Packed > &c)
 Return (a*b)+c. Performs MAD or FMA if supported by target architecture. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator- (const Vector< T, Dim, Packed > &arg)
 Negates all elements of the vector. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::operator+ (const Vector< T, Dim, Packed > &arg)
 Optional plus sign, leaves the vector as is. More...
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator* (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator/ (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator+ (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator- (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator* (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator/ (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator+ (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > mathter::operator- (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & mathter::operator*= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & mathter::operator/= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & mathter::operator+= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)
 
template<class T , int Dim, bool Packed, int... Indices>
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & mathter::operator-= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s)