Generic template for N-dimensional vectors. More...
#include <eagine/math/tvec.hpp>
Public Types | |
using | base = vector< T, N, V > |
The base vector type. | |
Public Member Functions | |
constexpr | tvec () noexcept |
Default constructor. Constructs a zero vector. | |
constexpr | tvec (T v) noexcept |
Constructor initializing all coordinates to v . | |
constexpr | tvec (const base &v) noexcept |
Construction from base vector. | |
tvec (const T(&d)[N]) noexcept | |
Construction from native array. | |
template<typename... P, typename = std::enable_if_t< (sizeof...(P) == N) && all_are_convertible_to<T, P...>::value>> | |
constexpr | tvec (P &&... p) noexcept |
Construction from coordinates. | |
template<typename P , int M, bool W, typename = std::enable_if_t<!std::is_same_v<P, T> || !(M == N)>> | |
constexpr | tvec (const vector< P, M, W > &v) noexcept |
Construction from vector of different dimensionality. | |
template<typename P , int M, bool W> | |
constexpr | tvec (const vector< P, M, W > &v, T d) noexcept |
Construction from vector of different dimensionality. | |
template<typename P , int M, bool W, typename... R, typename = std::enable_if_t< (sizeof...(R) > 1) && (M + sizeof...(R) == N) && all_are_convertible_to<T, R...>::value>> | |
constexpr | tvec (const vector< P, M, W > &v, R &&... r) noexcept |
Construction from vector of different dimensionality. | |
template<typename P , int M, bool W> | |
constexpr | tvec (const vector< P, M, W > &v, const vector< T, N - M, W > &w) noexcept |
Construction from a pair of vectors of different dimensionality. | |
Generic template for N-dimensional vectors.