31 template < std::
size_t N >
39 for ( std::size_t
const i :
range(
N ) )
40 ( *this )[i] += other[i];
46 for ( std::size_t
const i :
range(
N ) )
47 ( *this )[i] -= other[i];
58 template < std::
size_t N >
69 a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] };
79 template < std::
size_t N >
83 return acosf(
float(
dot( a, b ) ) / *s );
Definition: vec_point_base.h:35
constexpr vector< N > & operator+=(vector< N > const &other)
Definition: vector.h:37
constexpr vector< N > & operator-=(vector< N > const &other)
Definition: vector.h:44
MIT License.
Definition: impl.h:31
constexpr vector< 3 > normal_of(triangle< 3 > const &tri)
Definition: triangle.h:56
constexpr float dot(quaternion const &q, quaternion const &s)
Definition: quaternion.h:101
constexpr point< N > operator+(point< N > a, vector< N > const &b)
Returns a result of addition a to b, viz += operator.
Definition: point.h:93
constexpr vector< 3 > x_axis
instances of constants in the code for X/Y/Z axis
Definition: vector.h:54
constexpr auto length2_of(vec_point_base< Derived, N > const &a)
Returns squared distance of A from [0,0,0], this is a squared length of vector represented by A.
Definition: vec_point_base.h:192
constexpr auto sqrt(physical_quantity< Len, Mass, Time, Current, Temp, Mol, Li, Angle, Byte > val)
Square root of physical quantity is square root of it's value and the exponents are divided in half.
Definition: physical_quantity.h:215
constexpr vector< 3 > cross_product(vector< 3 > const &a, vector< 3 > const &b)
Calculates cross product between points A and B.
Definition: vector.h:66
constexpr vector< 3 > z_axis
Definition: vector.h:56
constexpr vector< 3 > y_axis
Definition: vector.h:55
constexpr float vector_angle(vector< N > const &a, vector< N > const &b)
Definition: vector.h:80
constexpr view< iterators::numeric_iterator< Numeric > > range(Numeric from, Numeric to)
Builds numeric view over interval [from, to)
Definition: range.h:34
N
Definition: static_storage.h:97