Maipa's Standard Library Extension 1.5.6
mstd
Loading...
Searching...
No Matches
mstd::vec< N, T > Class Template Reference

#include <vec.hpp>

Inheritance diagram for mstd::vec< N, T >:
[legend]
Collaboration diagram for mstd::vec< N, T >:
[legend]

Public Types

using value_type = T

Public Member Functions

_MSTD_CONSTEXPR20 vec ()
template<arithmetic... Ts>
_MSTD_CONSTEXPR20 vec (const Ts &... values)
template<size_t ON, arithmetic OT, arithmetic... Ts>
_MSTD_CONSTEXPR20 vec (const vec< ON, OT > &other, const Ts &... values)
template<size_t TN, arithmetic OT>
_MSTD_CONSTEXPR20 vec (const OT(&values)[TN])
template<arithmetic OT>
_MSTD_CONSTEXPR20 vec (const OT *values, const size_t &size)
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 vec (const vec< ON, OT > &other)
template<arithmetic AT, arithmetic BT, size_t ON>
_MSTD_CONSTEXPR20 vec (const vec< ON, AT > &otherA, const vec< ON, BT > &otherB)
_MSTD_CONSTEXPR20 ~vec ()=default
template<size_t TN, arithmetic OT>
_MSTD_CONSTEXPR20 vec< N, T > & operator= (const OT(&values)[TN])
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 vec< N, T > & operator= (const vec< ON, OT > &other)
_MSTD_CONSTEXPR20 bool is_zero () const
_MSTD_CONSTEXPR20 bool is_one () const
_MSTD_CONSTEXPR20 bool is_filled_with (const T &value) const
_MSTD_CONSTEXPR20 bool is_normalized () const
_MSTD_CONSTEXPR20 T & x ()
_MSTD_CONSTEXPR20 T x () const
_MSTD_CONSTEXPR20 T & r ()
_MSTD_CONSTEXPR20 T r () const
_MSTD_CONSTEXPR20 T & y () _MSTD_REQUIRES(N > 1)
_MSTD_CONSTEXPR20 T y () const _MSTD_REQUIRES(N > 1)
_MSTD_CONSTEXPR20 T & g () _MSTD_REQUIRES(N > 1)
_MSTD_CONSTEXPR20 T g () const _MSTD_REQUIRES(N > 1)
_MSTD_CONSTEXPR20 T & z () _MSTD_REQUIRES(N > 2)
_MSTD_CONSTEXPR20 T z () const _MSTD_REQUIRES(N > 2)
_MSTD_CONSTEXPR20 T & b () _MSTD_REQUIRES(N > 2)
_MSTD_CONSTEXPR20 T b () const _MSTD_REQUIRES(N > 2)
_MSTD_CONSTEXPR20 T & w () _MSTD_REQUIRES(N > 3)
_MSTD_CONSTEXPR20 T w () const _MSTD_REQUIRES(N > 3)
_MSTD_CONSTEXPR20 T & a () _MSTD_REQUIRES(N > 3)
_MSTD_CONSTEXPR20 T a () const _MSTD_REQUIRES(N > 3)
_MSTD_CONSTEXPR20 T length () const
_MSTD_CONSTEXPR20 vec< N, T > & normalize ()
_MSTD_CONSTEXPR20 vec< N, T > normalized () const
_MSTD_CONSTEXPR20 T dot (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 T angle_between (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > & reflect (const vec< N, T > &normal) noexcept
_MSTD_CONSTEXPR20 vec< N, T > reflected (const vec< N, T > &normal) const noexcept
_MSTD_CONSTEXPR20 vec< N, T > & refract (const vec< N, T > &normal, const T &eta)
_MSTD_CONSTEXPR20 vec< N, T > refracted (const vec< N, T > &normal, const T &eta) const
_MSTD_CONSTEXPR20 vec< N, T > & saturate () noexcept
_MSTD_CONSTEXPR20 vec< N, T > saturated () const noexcept
_MSTD_CONSTEXPR20 vec< N, T > & fract () noexcept
_MSTD_CONSTEXPR20 vec< N, T > fracted () const noexcept
_MSTD_CONSTEXPR20 vec< N, T > & mod (const T &y)
_MSTD_CONSTEXPR20 vec< N, T > modded (const T &y) const
_MSTD_CONSTEXPR20 vec< N, T > & mod (const vec< N, T > &other)
_MSTD_CONSTEXPR20 vec< N, T > modded (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > & pow (const T &y)
_MSTD_CONSTEXPR20 vec< N, T > powed (const T &y) const
_MSTD_CONSTEXPR20 vec< N, T > & pow (const vec< N, T > &other)
_MSTD_CONSTEXPR20 vec< N, T > powed (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > & clamp (const T &minVal, const T &maxVal)
_MSTD_CONSTEXPR20 vec< N, T > clampped (const T &minVal, const T &maxVal) const
_MSTD_CONSTEXPR20 vec< N, T > & clamp (const vec< N, T > &minVal, const vec< N, T > &maxVal)
_MSTD_CONSTEXPR20 vec< N, T > clampped (const vec< N, T > &minVal, const vec< N, T > &maxVal) const
_MSTD_CONSTEXPR20 vec< N, T > & step (const T &edge) noexcept
_MSTD_CONSTEXPR20 vec< N, T > & step (const vec< N, T > &edge) noexcept
_MSTD_CONSTEXPR20 vec< N, T > stepped (const T &edge) const noexcept
_MSTD_CONSTEXPR20 vec< N, T > stepped (const vec< N, T > &edge) const noexcept
_MSTD_CONSTEXPR20 vec< N, T > cross (const vec< N, T > &other) const _MSTD_REQUIRES(N
_MSTD_CONSTEXPR20 vec< N, T > T & rotate (const vec< N, T > &axis, const T &radians) _MSTD_REQUIRES(N
_MSTD_CONSTEXPR20 vec< N, T > T T rotated (const vec< N, T > &axis, const T &radians) _MSTD_REQUIRES(N
_MSTD_CONSTEXPR20 vec< N, T > T T T & operator+= (const vec< N, T > &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator-= (const vec< N, T > &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator*= (const vec< N, T > &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator/= (const vec< N, T > &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator+= (const T &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator-= (const T &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator*= (const T &other)
_MSTD_CONSTEXPR20 vec< N, T > & operator/= (const T &other)
_MSTD_CONSTEXPR20 vec< N, T > operator+ (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator- (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator* (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator/ (const vec< N, T > &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator+ (const T &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator- (const T &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator* (const T &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator/ (const T &other) const
_MSTD_CONSTEXPR20 vec< N, T > operator+ () const
_MSTD_CONSTEXPR20 vec< N, T > operator- () const
_MSTD_CONSTEXPR20 vec< N, T > & operator++ ()
_MSTD_CONSTEXPR20 vec< N, T > operator++ (int)
_MSTD_CONSTEXPR20 vec< N, T > & operator-- ()
_MSTD_CONSTEXPR20 vec< N, T > operator-- (int)
template<size_t ON>
_MSTD_CONSTEXPR20 bool operator== (const vec< ON, T > &other) const
template<size_t ON>
_MSTD_CONSTEXPR20 bool operator!= (const vec< ON, T > &other) const
_MSTD_CONSTEXPR20 operator const T * () const
_MSTD_CONSTEXPR20 T & operator[] (const size_t &idx)
_MSTD_CONSTEXPR20 T operator[] (const size_t &idx) const

Static Public Member Functions

static _MSTD_CONSTEXPR20 vec< N, T > zero ()
static _MSTD_CONSTEXPR20 vec< N, T > one ()
static _MSTD_CONSTEXPR20 vec< N, T > fill (const T &value)

Static Public Attributes

static _MSTD_CONSTEXPR20 const size_t size = N

Private Member Functions

template<arithmetic... Ts, size_t... Idxs>
_MSTD_CONSTEXPR20 void _set_values (const std::index_sequence< Idxs... > &, const Ts &... values)
_MSTD_CONSTEXPR20 void _fill_values (const T &value)
_MSTD_CONSTEXPR20 void _fill_values_from (size_t firstIdx, const T &value)
template<arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const OT *&values, const size_t &size)
template<size_t TN, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const OT(&values)[TN])
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const vec< ON, OT > &other)

Private Attributes

_values [N] = {}

Friends

_MSTD_CONSTEXPR20 vec< N, T > operator* (const T &other, const vec< N, T > &vector)
std::ostream & operator<< (std::ostream &str, const vec< N, T > &vector)

Member Typedef Documentation

◆ value_type

template<size_t N, arithmetic T>
using mstd::vec< N, T >::value_type = T

Constructor & Destructor Documentation

◆ vec() [1/7]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( )
inline

◆ vec() [2/7]

template<size_t N, arithmetic T>
template<arithmetic... Ts>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( const Ts &... values)
inline

◆ vec() [3/7]

template<size_t N, arithmetic T>
template<size_t ON, arithmetic OT, arithmetic... Ts>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( const vec< ON, OT > & other,
const Ts &... values )
inline

◆ vec() [4/7]

template<size_t N, arithmetic T>
template<size_t TN, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( const OT(&) values[TN])
inline

◆ vec() [5/7]

template<size_t N, arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( const OT * values,
const size_t & size )
inline

◆ vec() [6/7]

template<size_t N, arithmetic T>
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( const vec< ON, OT > & other)
inline

◆ vec() [7/7]

template<size_t N, arithmetic T>
template<arithmetic AT, arithmetic BT, size_t ON>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::vec ( const vec< ON, AT > & otherA,
const vec< ON, BT > & otherB )
inline

◆ ~vec()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::~vec ( )
default

Member Function Documentation

◆ _copy_values_from() [1/3]

template<size_t N, arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::vec< N, T >::_copy_values_from ( const OT *& values,
const size_t & size )
inlineprivate

◆ _copy_values_from() [2/3]

template<size_t N, arithmetic T>
template<size_t TN, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::vec< N, T >::_copy_values_from ( const OT(&) values[TN])
inlineprivate

◆ _copy_values_from() [3/3]

template<size_t N, arithmetic T>
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::vec< N, T >::_copy_values_from ( const vec< ON, OT > & other)
inlineprivate

◆ _fill_values()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::vec< N, T >::_fill_values ( const T & value)
inlineprivate

◆ _fill_values_from()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::vec< N, T >::_fill_values_from ( size_t firstIdx,
const T & value )
inlineprivate

◆ _set_values()

template<size_t N, arithmetic T>
template<arithmetic... Ts, size_t... Idxs>
_MSTD_CONSTEXPR20 void mstd::vec< N, T >::_set_values ( const std::index_sequence< Idxs... > & ,
const Ts &... values )
inlineprivate

◆ a() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::a ( )
inline

◆ a() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::a ( ) const
inline

◆ angle_between()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::angle_between ( const vec< N, T > & other) const
inline

◆ b() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::b ( )
inline

◆ b() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::b ( ) const
inline

◆ clamp() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::clamp ( const T & minVal,
const T & maxVal )
inline

◆ clamp() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::clamp ( const vec< N, T > & minVal,
const vec< N, T > & maxVal )
inline

◆ clampped() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::clampped ( const T & minVal,
const T & maxVal ) const
inline

◆ clampped() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::clampped ( const vec< N, T > & minVal,
const vec< N, T > & maxVal ) const
inline

◆ cross()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::cross ( const vec< N, T > & other) const

◆ dot()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::dot ( const vec< N, T > & other) const
inline

◆ fill()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::fill ( const T & value)
inlinestatic

◆ fract()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::fract ( )
inlinenoexcept

◆ fracted()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::fracted ( ) const
inlinenoexcept

◆ g() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::g ( )
inline

◆ g() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::g ( ) const
inline

◆ is_filled_with()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 bool mstd::vec< N, T >::is_filled_with ( const T & value) const
inline

◆ is_normalized()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 bool mstd::vec< N, T >::is_normalized ( ) const
inline

◆ is_one()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 bool mstd::vec< N, T >::is_one ( ) const
inline

◆ is_zero()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 bool mstd::vec< N, T >::is_zero ( ) const
inline

◆ length()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::length ( ) const
inline

◆ mod() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::mod ( const T & y)
inline

◆ mod() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::mod ( const vec< N, T > & other)
inline

◆ modded() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::modded ( const T & y) const
inline

◆ modded() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::modded ( const vec< N, T > & other) const
inline

◆ normalize()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::normalize ( )
inline

◆ normalized()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::normalized ( ) const
inline

◆ one()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::one ( )
inlinestatic

◆ operator const T *()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 mstd::vec< N, T >::operator const T * ( ) const
inline

◆ operator!=()

template<size_t N, arithmetic T>
template<size_t ON>
_MSTD_CONSTEXPR20 bool mstd::vec< N, T >::operator!= ( const vec< ON, T > & other) const
inline

◆ operator*() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator* ( const T & other) const
inline

◆ operator*() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator* ( const vec< N, T > & other) const
inline

◆ operator*=() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator*= ( const T & other)
inline

◆ operator*=() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator*= ( const vec< N, T > & other)
inline

◆ operator+() [1/3]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator+ ( ) const
inline

◆ operator+() [2/3]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator+ ( const T & other) const
inline

◆ operator+() [3/3]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator+ ( const vec< N, T > & other) const
inline

◆ operator++() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator++ ( )
inline

◆ operator++() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator++ ( int )
inline

◆ operator+=() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator+= ( const T & other)
inline

◆ operator+=() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > T T T & mstd::vec< N, T >::operator+= ( const vec< N, T > & other)
inline

◆ operator-() [1/3]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator- ( ) const
inline

◆ operator-() [2/3]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator- ( const T & other) const
inline

◆ operator-() [3/3]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator- ( const vec< N, T > & other) const
inline

◆ operator--() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator-- ( )
inline

◆ operator--() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator-- ( int )
inline

◆ operator-=() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator-= ( const T & other)
inline

◆ operator-=() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator-= ( const vec< N, T > & other)
inline

◆ operator/() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator/ ( const T & other) const
inline

◆ operator/() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::operator/ ( const vec< N, T > & other) const
inline

◆ operator/=() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator/= ( const T & other)
inline

◆ operator/=() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator/= ( const vec< N, T > & other)
inline

◆ operator=() [1/2]

template<size_t N, arithmetic T>
template<size_t TN, arithmetic OT>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator= ( const OT(&) values[TN])
inline

◆ operator=() [2/2]

template<size_t N, arithmetic T>
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::operator= ( const vec< ON, OT > & other)
inline

◆ operator==()

template<size_t N, arithmetic T>
template<size_t ON>
_MSTD_CONSTEXPR20 bool mstd::vec< N, T >::operator== ( const vec< ON, T > & other) const
inline

◆ operator[]() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::operator[] ( const size_t & idx)
inline

◆ operator[]() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::operator[] ( const size_t & idx) const
inline

◆ pow() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::pow ( const T & y)
inline

◆ pow() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::pow ( const vec< N, T > & other)
inline

◆ powed() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::powed ( const T & y) const
inline

◆ powed() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::powed ( const vec< N, T > & other) const
inline

◆ r() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::r ( )
inline

◆ r() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::r ( ) const
inline

◆ reflect()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::reflect ( const vec< N, T > & normal)
inlinenoexcept

◆ reflected()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::reflected ( const vec< N, T > & normal) const
inlinenoexcept

◆ refract()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::refract ( const vec< N, T > & normal,
const T & eta )
inline

◆ refracted()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::refracted ( const vec< N, T > & normal,
const T & eta ) const
inline

◆ rotate()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > T & mstd::vec< N, T >::rotate ( const vec< N, T > & axis,
const T & radians )

◆ rotated()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > T T mstd::vec< N, T >::rotated ( const vec< N, T > & axis,
const T & radians )

◆ saturate()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::saturate ( )
inlinenoexcept

◆ saturated()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::saturated ( ) const
inlinenoexcept

◆ step() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::step ( const T & edge)
inlinenoexcept

◆ step() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > & mstd::vec< N, T >::step ( const vec< N, T > & edge)
inlinenoexcept

◆ stepped() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::stepped ( const T & edge) const
inlinenoexcept

◆ stepped() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::stepped ( const vec< N, T > & edge) const
inlinenoexcept

◆ w() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::w ( )
inline

◆ w() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::w ( ) const
inline

◆ x() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::x ( )
inline

◆ x() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::x ( ) const
inline

◆ y() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::y ( )
inline

◆ y() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::y ( ) const
inline

◆ z() [1/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T & mstd::vec< N, T >::z ( )
inline

◆ z() [2/2]

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 T mstd::vec< N, T >::z ( ) const
inline

◆ zero()

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > mstd::vec< N, T >::zero ( )
inlinestatic

◆ operator*

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 vec< N, T > operator* ( const T & other,
const vec< N, T > & vector )
friend

◆ operator<<

template<size_t N, arithmetic T>
std::ostream & operator<< ( std::ostream & str,
const vec< N, T > & vector )
friend

Member Data Documentation

◆ _values

template<size_t N, arithmetic T>
T mstd::vec< N, T >::_values[N] = {}
private

◆ size

template<size_t N, arithmetic T>
_MSTD_CONSTEXPR20 const size_t mstd::vec< N, T >::size = N
static