|
| template<class T , class U , std::enable_if_t< std::is_arithmetic< T >::value, bool > = true> |
| auto | criptic::operator+ (const T &a, const Vec3< U > &v) -> Vec3< decltype(a+v[0])> |
| | Add a scalar and a Vec3 elementwise.
|
| |
| template<class T , class U , std::enable_if_t< std::is_arithmetic< T >::value, bool > = true> |
| auto | criptic::operator- (const T &a, const Vec3< U > &v) -> Vec3< decltype(a-v[0])> |
| | Subtract a scalar from a Vec3 elementwise.
|
| |
| template<class T , class U , std::enable_if_t< std::is_arithmetic< T >::value, bool > = true> |
| auto | criptic::operator* (const T &a, const Vec3< U > &v) -> Vec3< decltype(a *v[0])> |
| | Multiply a scalar by a Vec3 elementwise.
|
| |
| template<class T , class U , std::enable_if_t< std::is_arithmetic< T >::value, bool > = true> |
| auto | criptic::operator/ (const T &a, const Vec3< U > &v) -> Vec3< decltype(a/v[0])> |
| | Divide a Vec3 by a scalar elementwise.
|
| |
| template<class T , class U , std::enable_if_t< std::is_arithmetic< T >::value||std::is_enum< T >::value, bool > = true> |
| Vec3< bool > | criptic::operator== (const T &a, const Vec3< U > &v) |
| | Evaluate equality of a Vec3 with a scalar elementwise.
|
| |
| template<class T , class U , std::enable_if_t< std::is_arithmetic< T >::value||std::is_enum< T >::value, bool > = true> |
| Vec3< bool > | criptic::operator!= (const T &a, const Vec3< U > &v) |
| | Evaluate inequality of a Vec3 with a scalar elementwise.
|
| |
| template<class T , class U > |
| auto | criptic::min (const criptic::Vec3< T > &v1, const criptic::Vec3< U > &v2) -> Vec3< decltype(v1[0]+v2[0])> |
| | Return the elementwise minimum of two Vec3's.
|
| |
| template<class T , class U > |
| auto | criptic::max (const criptic::Vec3< T > &v1, const criptic::Vec3< U > &v2) -> Vec3< decltype(v1[0]+v2[0])> |
| | Return the elementwise maximum of two Vec3's.
|
| |
| template<class T > |
| Vec3< T > | criptic::floor (const criptic::Vec3< T > &v) |
| | Return the elementwise floor of a Vec3.
|
| |
| template<class T > |
| std::istream & | operator>> (std::istream &is, criptic::Vec3< T > &v) |
| | ASCII-formatted read of Vec3 from stream.
|
| |
| template<class T > |
| std::ostream & | operator<< (std::ostream &os, const criptic::Vec3< T > &v) |
| | ASCII-formatted output of Vec3 to stream.
|
| |
Class that represents a mathematical vector in 3-space.
This class represents a mathematical vector in 3-space, and provides basic vector algebra operations.