From 1107d936a8b3d2df1c30ae34889a0b54666af7ac Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Wed, 24 Feb 2021 04:45:56 +0700 Subject: [PATCH] remove all constexpr and noexcept specs from readme --- README.md | 1036 ++++++++++++++++++++++++++--------------------------- 1 file changed, 518 insertions(+), 518 deletions(-) diff --git a/README.md b/README.md index 9cf8abb..6103240 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,9 @@ public: T x = T{0}; T y = T{0}; - constexpr vec_base() = default; - constexpr explicit vec_base(T v); - constexpr vec_base(T x, T y); + vec_base() = default; + explicit vec_base(T v); + vec_base(T x, T y); }; template < typename T > @@ -100,13 +100,13 @@ public: T y = T{0}; T z = T{0}; - constexpr vec_base() = default; - constexpr explicit vec_base(T v); - constexpr vec_base(T x, T y, T z); - constexpr vec_base(const vec_base& xy, T z); - constexpr vec_base(T x, const vec_base& yz); + vec_base() = default; + explicit vec_base(T v); + vec_base(T x, T y, T z); + vec_base(const vec_base& xy, T z); + vec_base(T x, const vec_base& yz); - constexpr explicit operator vec() const; + explicit operator vec() const; }; template < typename T > @@ -117,18 +117,18 @@ public: T z = T{0}; T w = T{0}; - constexpr vec_base() = default; - constexpr explicit vec_base(T v); - constexpr vec_base(T x, T y, T z, T w); - constexpr vec_base(const vec_base& xy, T z, T w); - constexpr vec_base(T x, const vec_base& yz, T w); - constexpr vec_base(T x, T y, const vec_base& zw); - constexpr vec_base(const vec_base& xy, const vec_base& zw); - constexpr vec_base(const vec_base& xyz, T w); - constexpr vec_base(T x, const vec_base& yzw); + vec_base() = default; + explicit vec_base(T v); + vec_base(T x, T y, T z, T w); + vec_base(const vec_base& xy, T z, T w); + vec_base(T x, const vec_base& yz, T w); + vec_base(T x, T y, const vec_base& zw); + vec_base(const vec_base& xy, const vec_base& zw); + vec_base(const vec_base& xyz, T w); + vec_base(T x, const vec_base& yzw); - constexpr explicit operator vec() const; - constexpr explicit operator vec() const; + explicit operator vec() const; + explicit operator vec() const; }; template < typename T, size_t Size > @@ -149,37 +149,37 @@ public: using reverse_iterator = std::reverse_iterator; using const_reverse_iterator = std::reverse_iterator; - static constexpr size_t size = Size; + static inline size_t size = Size; - constexpr vec() = default; - constexpr vec(const vec&) = default; - constexpr vec& operator=(const vec&) = default; + vec() = default; + vec(const vec&) = default; + vec& operator=(const vec&) = default; - void swap(vec& other) noexcept(is_nothrow_swappable_v); + void swap(vec& other); - iterator begin() noexcept; - const_iterator begin() const noexcept; - iterator end() noexcept; - const_iterator end() const noexcept; + iterator begin(); + const_iterator begin() const; + iterator end(); + const_iterator end() const; - reverse_iterator rbegin() noexcept; - const_reverse_iterator rbegin() const noexcept; - reverse_iterator rend() noexcept; - const_reverse_iterator rend() const noexcept; + reverse_iterator rbegin(); + const_reverse_iterator rbegin() const; + reverse_iterator rend(); + const_reverse_iterator rend() const; - const_iterator cbegin() const noexcept; - const_iterator cend() const noexcept; - const_reverse_iterator crbegin() const noexcept; - const_reverse_iterator crend() const noexcept; + const_iterator cbegin() const; + const_iterator cend() const; + const_reverse_iterator crbegin() const; + const_reverse_iterator crend() const; - pointer data() noexcept; - const_pointer data() const noexcept; + pointer data(); + const_pointer data() const; - constexpr reference at(size_t index); - constexpr const_reference at(size_t index) const; + reference at(size_t index); + const_reference at(size_t index) const; - constexpr reference operator[](size_t index) noexcept; - constexpr const_reference operator[](size_t index) const noexcept; + reference operator[](size_t index); + const_reference operator[](size_t index) const; }; using bool2 = vec; @@ -226,15 +226,15 @@ public: row_type{T{1}, T{0}}, row_type{T{0}, T{1}}}; - constexpr mat_base() = default; - constexpr explicit mat_base(T d); - constexpr explicit mat_base(const row_type& d); + mat_base() = default; + explicit mat_base(T d); + explicit mat_base(const row_type& d); - constexpr mat_base( + mat_base( T m11, T m12, T m21, T m22); - constexpr mat_base( + mat_base( const row_type& row0, const row_type& row1); }; @@ -249,27 +249,27 @@ public: row_type{T{0}, T{1}, T{0}}, row_type{T{0}, T{0}, T{1}}}; - constexpr mat_base() = default; - constexpr explicit mat_base(T d); - constexpr explicit mat_base(const row_type& d); + mat_base() = default; + explicit mat_base(T d); + explicit mat_base(const row_type& d); - constexpr mat_base( + mat_base( T m11, T m12, T m13, T m21, T m22, T m23, T m31, T m32, T m33); - constexpr mat_base( + mat_base( const row_type& row0, const row_type& row1, const row_type& row2); - constexpr mat_base( + mat_base( const mat_base& m, const vec_base& v); - constexpr explicit mat_base(const mat_base& other); + explicit mat_base(const mat_base& other); - constexpr explicit operator mat() const; + explicit operator mat() const; }; template < typename T > @@ -283,31 +283,31 @@ public: row_type{T{0}, T{0}, T{1}, T{0}}, row_type{T{0}, T{0}, T{0}, T{1}}}; - constexpr mat_base() = default; - constexpr explicit mat_base(T d); - constexpr explicit mat_base(const row_type& d); + mat_base() = default; + explicit mat_base(T d); + explicit mat_base(const row_type& d); - constexpr mat_base( + mat_base( T m11, T m12, T m13, T m14, T m21, T m22, T m23, T m24, T m31, T m32, T m33, T m34, T m41, T m42, T m43, T m44); - constexpr mat_base( + mat_base( const row_type& row0, const row_type& row1, const row_type& row2, const row_type& row3); - constexpr mat_base( + mat_base( const mat_base& m, const vec_base& v); - constexpr explicit mat_base(const mat_base& other); - constexpr explicit mat_base(const mat_base& other); + explicit mat_base(const mat_base& other); + explicit mat_base(const mat_base& other); - constexpr explicit operator mat() const; - constexpr explicit operator mat() const; + explicit operator mat() const; + explicit operator mat() const; }; template < typename T, size_t Size > @@ -330,37 +330,37 @@ public: using reverse_iterator = std::reverse_iterator; using const_reverse_iterator = std::reverse_iterator; - static constexpr size_t size = Size; + static inline size_t size = Size; - constexpr mat() = default; - constexpr mat(const mat&) = default; - constexpr mat& operator=(const mat&) = default; + mat() = default; + mat(const mat&) = default; + mat& operator=(const mat&) = default; - void swap(mat& other) noexcept(is_nothrow_swappable_v); + void swap(mat& other); - iterator begin() noexcept; - const_iterator begin() const noexcept; - iterator end() noexcept; - const_iterator end() const noexcept; + iterator begin(); + const_iterator begin() const; + iterator end(); + const_iterator end() const; - reverse_iterator rbegin() noexcept; - const_reverse_iterator rbegin() const noexcept; - reverse_iterator rend() noexcept; - const_reverse_iterator rend() const noexcept; + reverse_iterator rbegin(); + const_reverse_iterator rbegin() const; + reverse_iterator rend(); + const_reverse_iterator rend() const; - const_iterator cbegin() const noexcept; - const_iterator cend() const noexcept; - const_reverse_iterator crbegin() const noexcept; - const_reverse_iterator crend() const noexcept; + const_iterator cbegin() const; + const_iterator cend() const; + const_reverse_iterator crbegin() const; + const_reverse_iterator crend() const; - pointer data() noexcept; - const_pointer data() const noexcept; + pointer data(); + const_pointer data() const; - constexpr reference at(size_t index); - constexpr const_reference at(size_t index) const; + reference at(size_t index); + const_reference at(size_t index) const; - constexpr reference operator[](size_t index) noexcept; - constexpr const_reference operator[](size_t index) const noexcept; + reference operator[](size_t index); + const_reference operator[](size_t index) const; }; using bool2x2 = mat; @@ -401,12 +401,12 @@ public: vec v = vec{T{0}}; T s = T{1}; - constexpr qua_base(); - constexpr qua_base(T vx, T vy, T vz, T s); - constexpr qua_base(const vec& v, T s); + qua_base(); + qua_base(T vx, T vy, T vz, T s); + qua_base(const vec& v, T s); - constexpr explicit qua_base(const vec& vs); - constexpr explicit operator vec() const; + explicit qua_base(const vec& vs); + explicit operator vec() const; }; template < typename T > @@ -430,37 +430,37 @@ public: using reverse_iterator = std::reverse_iterator; using const_reverse_iterator = std::reverse_iterator; - static constexpr size_t size = 4; -public: - constexpr qua() = default; - constexpr qua(const qua&) = default; - constexpr qua& operator=(const qua&) = default; + static inline size_t size = 4; - void swap(qua& other) noexcept(is_nothrow_swappable_v); + qua() = default; + qua(const qua&) = default; + qua& operator=(const qua&) = default; - iterator begin() noexcept; - const_iterator begin() const noexcept; - iterator end() noexcept; - const_iterator end() const noexcept; + void swap(qua& other); - reverse_iterator rbegin() noexcept; - const_reverse_iterator rbegin() const noexcept; - reverse_iterator rend() noexcept; - const_reverse_iterator rend() const noexcept; + iterator begin(); + const_iterator begin() const; + iterator end(); + const_iterator end() const; - const_iterator cbegin() const noexcept; - const_iterator cend() const noexcept; - const_reverse_iterator crbegin() const noexcept; - const_reverse_iterator crend() const noexcept; + reverse_iterator rbegin(); + const_reverse_iterator rbegin() const; + reverse_iterator rend(); + const_reverse_iterator rend() const; - pointer data() noexcept; - const_pointer data() const noexcept; + const_iterator cbegin() const; + const_iterator cend() const; + const_reverse_iterator crbegin() const; + const_reverse_iterator crend() const; - constexpr reference at(size_t index); - constexpr const_reference at(size_t index) const; + pointer data(); + const_pointer data() const; - constexpr reference operator[](size_t index) noexcept; - constexpr const_reference operator[](size_t index) const noexcept; + reference at(size_t index); + const_reference at(size_t index) const; + + reference operator[](size_t index); + const_reference operator[](size_t index) const; }; using qfloat = qua; @@ -473,192 +473,192 @@ using qdouble = qua; // +operator template < typename T, size_t Size > -constexpr auto operator+(const vec& xs); +auto operator+(const vec& xs); // -operator template < typename T, size_t Size > -constexpr auto operator-(const vec& xs); +auto operator-(const vec& xs); // ~operator template < typename T, size_t Size > -constexpr auto operator~(const vec& xs); +auto operator~(const vec& xs); // !operator template < typename T, size_t Size > -constexpr auto operator!(const vec& xs); +auto operator!(const vec& xs); // operator+ template < typename T, size_t Size > -constexpr auto operator+(const vec& xs, T y); +auto operator+(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator+(T x, const vec& ys); +auto operator+(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator+(const vec& xs, const vec& ys); +auto operator+(const vec& xs, const vec& ys); // operator+= template < typename T, size_t Size > -constexpr vec& operator+=(vec& xs, T y); +vec& operator+=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator+=(vec& xs, const vec& ys); +vec& operator+=(vec& xs, const vec& ys); // operator- template < typename T, size_t Size > -constexpr auto operator-(const vec& xs, T y); +auto operator-(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator-(T x, const vec& ys); +auto operator-(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator-(const vec& xs, const vec& ys); +auto operator-(const vec& xs, const vec& ys); // operator-= template < typename T, size_t Size > -constexpr vec& operator-=(vec& xs, T y); +vec& operator-=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator-=(vec& xs, const vec& ys); +vec& operator-=(vec& xs, const vec& ys); // operator* template < typename T, size_t Size > -constexpr auto operator*(const vec& xs, T y); +auto operator*(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator*(T x, const vec& ys); +auto operator*(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator*(const vec& xs, const vec& ys); +auto operator*(const vec& xs, const vec& ys); // operator*= template < typename T, size_t Size > -constexpr vec& operator*=(vec& xs, T y); +vec& operator*=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator*=(vec& xs, const vec& ys); +vec& operator*=(vec& xs, const vec& ys); // operator/ template < typename T, size_t Size > -constexpr auto operator/(const vec& xs, T y); +auto operator/(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator/(T x, const vec& ys); +auto operator/(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator/(const vec& xs, const vec& ys); +auto operator/(const vec& xs, const vec& ys); // operator/= template < typename T, size_t Size > -constexpr vec& operator/=(vec& xs, T y); +vec& operator/=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator/=(vec& xs, const vec& ys); +vec& operator/=(vec& xs, const vec& ys); // operator& template < typename T, size_t Size > -constexpr auto operator&(const vec& xs, T y); +auto operator&(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator&(T x, const vec& ys); +auto operator&(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator&(const vec& xs, const vec& ys); +auto operator&(const vec& xs, const vec& ys); // operator&= template < typename T, size_t Size > -constexpr vec& operator&=(vec& xs, T y); +vec& operator&=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator&=(vec& xs, const vec& ys); +vec& operator&=(vec& xs, const vec& ys); // operator| template < typename T, size_t Size > -constexpr auto operator|(const vec& xs, T y); +auto operator|(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator|(T x, const vec& ys); +auto operator|(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator|(const vec& xs, const vec& ys); +auto operator|(const vec& xs, const vec& ys); // operator|= template < typename T, size_t Size > -constexpr vec& operator|=(vec& xs, T y); +vec& operator|=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator|=(vec& xs, const vec& ys); +vec& operator|=(vec& xs, const vec& ys); // operator^ template < typename T, size_t Size > -constexpr auto operator^(const vec& xs, T y); +auto operator^(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator^(T x, const vec& ys); +auto operator^(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator^(const vec& xs, const vec& ys); +auto operator^(const vec& xs, const vec& ys); // operator^= template < typename T, size_t Size > -constexpr vec& operator^=(vec& xs, T y); +vec& operator^=(vec& xs, T y); template < typename T, size_t Size > -constexpr vec& operator^=(vec& xs, const vec& ys); +vec& operator^=(vec& xs, const vec& ys); // operator&& template < typename T, size_t Size > -constexpr auto operator&&(const vec& xs, T y); +auto operator&&(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator&&(T x, const vec& ys); +auto operator&&(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator&&(const vec& xs, const vec& ys); +auto operator&&(const vec& xs, const vec& ys); // operator|| template < typename T, size_t Size > -constexpr auto operator||(const vec& xs, T y); +auto operator||(const vec& xs, T y); template < typename T, size_t Size > -constexpr auto operator||(T x, const vec& ys); +auto operator||(T x, const vec& ys); template < typename T, size_t Size > -constexpr auto operator||(const vec& xs, const vec& ys); +auto operator||(const vec& xs, const vec& ys); // operator== template < typename T, size_t Size > -constexpr bool operator==(const vec& xs, const vec& ys); +bool operator==(const vec& xs, const vec& ys); // operator!= template < typename T, size_t Size > -constexpr bool operator!=(const vec& xs, const vec& ys); +bool operator!=(const vec& xs, const vec& ys); // operator< template < typename T, size_t Size > -constexpr bool operator<(const vec& xs, const vec& ys); +bool operator<(const vec& xs, const vec& ys); ``` ### Matrix Operators @@ -667,192 +667,192 @@ constexpr bool operator<(const vec& xs, const vec& ys); // +operator template < typename T, size_t Size > -constexpr auto operator+(const mat& xs); +auto operator+(const mat& xs); // -operator template < typename T, size_t Size > -constexpr auto operator-(const mat& xs); +auto operator-(const mat& xs); // ~operator template < typename T, size_t Size > -constexpr auto operator~(const mat& xs); +auto operator~(const mat& xs); // !operator template < typename T, size_t Size > -constexpr auto operator!(const mat& xs); +auto operator!(const mat& xs); // operator+ template < typename T, size_t Size > -constexpr auto operator+(const mat& xs, T y); +auto operator+(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator+(T x, const mat& ys); +auto operator+(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator+(const mat& xs, const mat& ys); +auto operator+(const mat& xs, const mat& ys); // operator+= template < typename T, size_t Size > -constexpr mat& operator+=(mat& xs, T y); +mat& operator+=(mat& xs, T y); template < typename T, size_t Size > -constexpr mat& operator+=(mat& xs, const mat& ys); +mat& operator+=(mat& xs, const mat& ys); // operator- template < typename T, size_t Size > -constexpr auto operator-(const mat& xs, T y); +auto operator-(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator-(T x, const mat& ys); +auto operator-(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator-(const mat& xs, const mat& ys); +auto operator-(const mat& xs, const mat& ys); // operator-= template < typename T, size_t Size > -constexpr mat& operator-=(mat& xs, T y); +mat& operator-=(mat& xs, T y); template < typename T, size_t Size > -constexpr mat& operator-=(mat& xs, const mat& ys); +mat& operator-=(mat& xs, const mat& ys); // operator* template < typename T, size_t Size > -constexpr auto operator*(const mat& xs, T y); +auto operator*(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator*(T x, const mat& ys); +auto operator*(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator*(const vec& xs, const mat& ys); +auto operator*(const vec& xs, const mat& ys); template < typename T, size_t Size > -constexpr auto operator*(const mat& xs, const mat& ys); +auto operator*(const mat& xs, const mat& ys); // operator*= template < typename T, size_t Size > -constexpr mat& operator*=(mat& xs, T y); +mat& operator*=(mat& xs, T y); template < typename T, size_t Size > -constexpr vec& operator*=(vec& xs, const mat& ys); +vec& operator*=(vec& xs, const mat& ys); template < typename T, size_t Size > -constexpr mat& operator*=(mat& xs, const mat& ys); +mat& operator*=(mat& xs, const mat& ys); // operator/ template < typename T, size_t Size > -constexpr auto operator/(const mat& xs, T y); +auto operator/(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator/(T x, const mat& ys); +auto operator/(T x, const mat& ys); // operator/= template < typename T, size_t Size > -constexpr mat& operator/=(mat& xs, T y); +mat& operator/=(mat& xs, T y); // operator& template < typename T, size_t Size > -constexpr auto operator&(const mat& xs, T y); +auto operator&(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator&(T x, const mat& ys); +auto operator&(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator&(const mat& xs, const mat& ys); +auto operator&(const mat& xs, const mat& ys); // operator&= template < typename T, size_t Size > -constexpr mat& operator&=(mat& xs, T y); +mat& operator&=(mat& xs, T y); template < typename T, size_t Size > -constexpr mat& operator&=(mat& xs, const mat& ys); +mat& operator&=(mat& xs, const mat& ys); // operator| template < typename T, size_t Size > -constexpr auto operator|(const mat& xs, T y); +auto operator|(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator|(T x, const mat& ys); +auto operator|(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator|(const mat& xs, const mat& ys); +auto operator|(const mat& xs, const mat& ys); // operator|= template < typename T, size_t Size > -constexpr mat& operator|=(mat& xs, T y); +mat& operator|=(mat& xs, T y); template < typename T, size_t Size > -constexpr mat& operator|=(mat& xs, const mat& ys); +mat& operator|=(mat& xs, const mat& ys); // operator^ template < typename T, size_t Size > -constexpr auto operator^(const mat& xs, T y); +auto operator^(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator^(T x, const mat& ys); +auto operator^(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator^(const mat& xs, const mat& ys); +auto operator^(const mat& xs, const mat& ys); // operator^= template < typename T, size_t Size > -constexpr mat& operator^=(mat& xs, T y); +mat& operator^=(mat& xs, T y); template < typename T, size_t Size > -constexpr mat& operator^=(mat& xs, const mat& ys); +mat& operator^=(mat& xs, const mat& ys); // operator&& template < typename T, size_t Size > -constexpr auto operator&&(const mat& xs, T y); +auto operator&&(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator&&(T x, const mat& ys); +auto operator&&(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator&&(const mat& xs, const mat& ys); +auto operator&&(const mat& xs, const mat& ys); // operator|| template < typename T, size_t Size > -constexpr auto operator||(const mat& xs, T y); +auto operator||(const mat& xs, T y); template < typename T, size_t Size > -constexpr auto operator||(T x, const mat& ys); +auto operator||(T x, const mat& ys); template < typename T, size_t Size > -constexpr auto operator||(const mat& xs, const mat& ys); +auto operator||(const mat& xs, const mat& ys); // operator== template < typename T, size_t Size > -constexpr bool operator==(const mat& xs, const mat& ys); +bool operator==(const mat& xs, const mat& ys); // operator!= template < typename T, size_t Size > -constexpr bool operator!=(const mat& xs, const mat& ys); +bool operator!=(const mat& xs, const mat& ys); // operator< template < typename T, size_t Size > -constexpr bool operator<(const mat& xs, const mat& ys); +bool operator<(const mat& xs, const mat& ys); ``` ### Quaternion Operators @@ -861,85 +861,85 @@ constexpr bool operator<(const mat& xs, const mat& ys); // +operator template < typename T > -constexpr auto operator+(const qua& xs); +auto operator+(const qua& xs); // -operator template < typename T > -constexpr auto operator-(const qua& xs); +auto operator-(const qua& xs); // operator+ template < typename T > -constexpr auto operator+(const qua& xs, const qua& ys); +auto operator+(const qua& xs, const qua& ys); // operator+= template < typename T > -constexpr qua& operator+=(qua& xs, const qua& ys); +qua& operator+=(qua& xs, const qua& ys); // operator- template < typename T > -constexpr auto operator-(const qua& xs, const qua& ys); +auto operator-(const qua& xs, const qua& ys); // operator-= template < typename T > -constexpr qua& operator-=(qua& xs, const qua& ys); +qua& operator-=(qua& xs, const qua& ys); // operator* template < typename T > -constexpr auto operator*(const qua& xs, T y); +auto operator*(const qua& xs, T y); template < typename T > -constexpr auto operator*(T x, const qua& ys); +auto operator*(T x, const qua& ys); template < typename T > -constexpr auto operator*(const vec& xs, const qua& ys); +auto operator*(const vec& xs, const qua& ys); template < typename T > -constexpr auto operator*(const qua& xs, const qua& ys); +auto operator*(const qua& xs, const qua& ys); // operator*= template < typename T > -constexpr qua& operator*=(qua& xs, T y); +qua& operator*=(qua& xs, T y); template < typename T > -constexpr vec& operator*=(vec& xs, const qua& ys); +vec& operator*=(vec& xs, const qua& ys); template < typename T > -constexpr qua& operator*=(qua& xs, const qua& ys); +qua& operator*=(qua& xs, const qua& ys); // operator/ template < typename T > -constexpr auto operator/(const qua& xs, T y); +auto operator/(const qua& xs, T y); template < typename T > -constexpr auto operator/(T x, const qua& ys); +auto operator/(T x, const qua& ys); // operator/= template < typename T > -constexpr qua& operator/=(qua& xs, T y); +qua& operator/=(qua& xs, T y); // operator== template < typename T > -constexpr bool operator==(const qua& xs, const qua& ys); +bool operator==(const qua& xs, const qua& ys); // operator!= template < typename T > -constexpr bool operator!=(const qua& xs, const qua& ys); +bool operator!=(const qua& xs, const qua& ys); // operator< template < typename T > -constexpr bool operator<(const qua& xs, const qua& ys); +bool operator<(const qua& xs, const qua& ys); ``` ### Common Functions @@ -948,83 +948,83 @@ constexpr bool operator<(const qua& xs, const qua& ys); ```cpp template < arithmetic T > -constexpr T abs(T x) noexcept; +T abs(T x); template < arithmetic T > -constexpr T sqr(T x) noexcept; +T sqr(T x); template < arithmetic T > -constexpr T sign(T x) noexcept; +T sign(T x); template < floating_point T > -constexpr T rcp(T x) noexcept; +T rcp(T x); template < floating_point T > -T floor(T x) noexcept; +T floor(T x); template < floating_point T > -T trunc(T x) noexcept; +T trunc(T x); template < floating_point T > -T round(T x) noexcept; +T round(T x); template < floating_point T > -T ceil(T x) noexcept; +T ceil(T x); template < floating_point T > -T fract(T x) noexcept; +T fract(T x); template < floating_point T > -T fmod(T x, T y) noexcept; +T fmod(T x, T y); template < floating_point T > -T modf(T x, T* y) noexcept; +T modf(T x, T* y); template < floating_point T > -T copysign(T x, T s) noexcept; +T copysign(T x, T s); template < arithmetic T > -constexpr T min(T x, T y) noexcept; +T min(T x, T y); template < arithmetic T > -constexpr T max(T x, T y) noexcept; +T max(T x, T y); template < arithmetic T > -constexpr T clamp(T x, T min_x, T max_x) noexcept; +T clamp(T x, T min_x, T max_x); template < arithmetic T > -constexpr T saturate(T x) noexcept; +T saturate(T x); template < floating_point T > -constexpr T lerp(T x, T y, T a) noexcept; +T lerp(T x, T y, T a); template < floating_point T > -constexpr T lerp(T x, T y, T x_a, T y_a) noexcept; +T lerp(T x, T y, T x_a, T y_a); template < floating_point T > -constexpr T step(T edge, T x) noexcept; +T step(T edge, T x); template < floating_point T > -constexpr T smoothstep(T edge0, T edge1, T x) noexcept; +T smoothstep(T edge0, T edge1, T x); template < floating_point T > -T fma(T x, T y, T z) noexcept; +T fma(T x, T y, T z); ``` #### Vector ```cpp template < typename T, size_t Size > -constexpr vec abs(const vec& xs); +vec abs(const vec& xs); template < typename T, size_t Size > -constexpr vec sqr(const vec& xs); +vec sqr(const vec& xs); template < typename T, size_t Size > -constexpr vec sign(const vec& xs); +vec sign(const vec& xs); template < typename T, size_t Size > -constexpr vec rcp(const vec& xs); +vec rcp(const vec& xs); template < typename T, size_t Size > vec floor(const vec& xs); @@ -1057,61 +1057,61 @@ template < typename T, size_t Size > vec copysign(const vec& xs, const vec& ss); template < typename T, size_t Size > -constexpr T min(const vec& xs); +T min(const vec& xs); template < typename T, size_t Size > -constexpr vec min(const vec& xs, T y); +vec min(const vec& xs, T y); template < typename T, size_t Size > -constexpr vec min(T x, const vec& ys); +vec min(T x, const vec& ys); template < typename T, size_t Size > -constexpr vec min(const vec& xs, const vec& ys); +vec min(const vec& xs, const vec& ys); template < typename T, size_t Size > -constexpr T max(const vec& xs); +T max(const vec& xs); template < typename T, size_t Size > -constexpr vec max(const vec& xs, T y); +vec max(const vec& xs, T y); template < typename T, size_t Size > -constexpr vec max(T x, const vec& ys); +vec max(T x, const vec& ys); template < typename T, size_t Size > -constexpr vec max(const vec& xs, const vec& ys); +vec max(const vec& xs, const vec& ys); template < typename T, size_t Size > -constexpr vec clamp(const vec& xs, T min_x, T max_x); +vec clamp(const vec& xs, T min_x, T max_x); template < typename T, size_t Size > -constexpr vec clamp(const vec& xs, const vec& min_xs, const vec& max_xs); +vec clamp(const vec& xs, const vec& min_xs, const vec& max_xs); template < typename T, size_t Size > -constexpr vec saturate(const vec& xs); +vec saturate(const vec& xs); template < typename T, size_t Size > -constexpr vec lerp(const vec& xs, const vec& ys, T a); +vec lerp(const vec& xs, const vec& ys, T a); template < typename T, size_t Size > -constexpr vec lerp(const vec& xs, const vec& ys, T x_a, T y_a); +vec lerp(const vec& xs, const vec& ys, T x_a, T y_a); template < typename T, size_t Size > -constexpr vec lerp(const vec& xs, const vec& ys, const vec& as); +vec lerp(const vec& xs, const vec& ys, const vec& as); template < typename T, size_t Size > -constexpr vec lerp(const vec& xs, const vec& ys, const vec& xs_a, const vec& ys_a); +vec lerp(const vec& xs, const vec& ys, const vec& xs_a, const vec& ys_a); template < typename T, size_t Size > -constexpr vec step(T edge, const vec& xs); +vec step(T edge, const vec& xs); template < typename T, size_t Size > -constexpr vec step(const vec& edges, const vec& xs); +vec step(const vec& edges, const vec& xs); template < typename T, size_t Size > -constexpr vec smoothstep(T edge0, T edge1, const vec& xs); +vec smoothstep(T edge0, T edge1, const vec& xs); template < typename T, size_t Size > -constexpr vec smoothstep(const vec& edges0, const vec& edges1, const vec& xs); +vec smoothstep(const vec& edges0, const vec& edges1, const vec& xs); template < typename T, size_t Size > vec fma(const vec& as, const vec& bs, const vec& cs); @@ -1139,65 +1139,65 @@ qua slerp(const qua& unit_xs, const qua& unit_ys, T a); ```cpp template < floating_point T > -constexpr T radians(T degrees) noexcept; +T radians(T degrees); template < floating_point T > -constexpr T degrees(T radians) noexcept; +T degrees(T radians); template < floating_point T > -T sin(T x) noexcept; +T sin(T x); template < floating_point T > -T cos(T x) noexcept; +T cos(T x); template < floating_point T > -T tan(T x) noexcept; +T tan(T x); template < floating_point T > -T asin(T x) noexcept; +T asin(T x); template < floating_point T > -T acos(T x) noexcept; +T acos(T x); template < floating_point T > -T atan(T x) noexcept; +T atan(T x); template < floating_point T > -T atan2(T y, T x) noexcept; +T atan2(T y, T x); template < floating_point T > -T sinh(T x) noexcept; +T sinh(T x); template < floating_point T > -T cosh(T x) noexcept; +T cosh(T x); template < floating_point T > -T tanh(T x) noexcept; +T tanh(T x); template < floating_point T > -T asinh(T x) noexcept; +T asinh(T x); template < floating_point T > -T acosh(T x) noexcept; +T acosh(T x); template < floating_point T > -T atanh(T x) noexcept; +T atanh(T x); template < floating_point T > -pair sincos(T x) noexcept; +pair sincos(T x); template < floating_point T > -void sincos(T x, T* s, T* c) noexcept; +void sincos(T x, T* s, T* c); ``` #### Vector ```cpp template < typename T, size_t Size > -constexpr vec radians(const vec& degrees); +vec radians(const vec& degrees); template < typename T, size_t Size > -constexpr vec degrees(const vec& radians); +vec degrees(const vec& radians); template < typename T, size_t Size > vec sin(const vec& xs); @@ -1251,25 +1251,25 @@ void sincos(const vec& xs, vec* ss, vec* cs); ```cpp template < floating_point T > -T pow(T x, T y) noexcept; +T pow(T x, T y); template < floating_point T > -T exp(T x) noexcept; +T exp(T x); template < floating_point T > -T log(T x) noexcept; +T log(T x); template < floating_point T > -T exp2(T x) noexcept; +T exp2(T x); template < floating_point T > -T log2(T x) noexcept; +T log2(T x); template < floating_point T > -T sqrt(T x) noexcept; +T sqrt(T x); template < floating_point T > -T rsqrt(T x) noexcept; +T rsqrt(T x); ``` #### Vector @@ -1303,44 +1303,44 @@ vec rsqrt(const vec& xs); ```cpp template < arithmetic T > -constexpr T dot(T x, T y) noexcept; +T dot(T x, T y); template < arithmetic T > -constexpr T length(T x) noexcept; +T length(T x); template < arithmetic T > -constexpr T rlength(T x) noexcept; +T rlength(T x); template < arithmetic T > -constexpr T length2(T x) noexcept; +T length2(T x); template < arithmetic T > -constexpr T rlength2(T x) noexcept; +T rlength2(T x); template < arithmetic T > -constexpr T distance(T x, T y) noexcept; +T distance(T x, T y); template < arithmetic T > -constexpr T distance2(T x, T y) noexcept; +T distance2(T x, T y); template < floating_point T > -T normalize(T x) noexcept; +T normalize(T x); template < floating_point T > -constexpr T faceforward(T n, T i, T nref) noexcept; +T faceforward(T n, T i, T nref); template < floating_point T > -constexpr T reflect(T i, T n) noexcept; +T reflect(T i, T n); template < floating_point T > -T refract(T i, T n, T eta) noexcept; +T refract(T i, T n, T eta); ``` #### Vector ```cpp template < typename T, size_t Size > -constexpr T dot(const vec& xs, const vec& ys); +T dot(const vec& xs, const vec& ys); template < typename T, size_t Size > T length(const vec& xs); @@ -1349,31 +1349,31 @@ template < typename T, size_t Size > T rlength(const vec& xs); template < typename T, size_t Size > -constexpr T length2(const vec& xs); +T length2(const vec& xs); template < typename T, size_t Size > -constexpr T rlength2(const vec& xs); +T rlength2(const vec& xs); template < typename T, size_t Size > T distance(const vec& xs, const vec& ys); template < typename T, size_t Size > -constexpr T distance2(const vec& xs, const vec& ys); +T distance2(const vec& xs, const vec& ys); template < typename T > -constexpr T cross(const vec& xs, const vec& ys); +T cross(const vec& xs, const vec& ys); template < typename T > -constexpr vec cross(const vec& xs, const vec& ys); +vec cross(const vec& xs, const vec& ys); template < typename T, size_t Size > vec normalize(const vec& xs); template < typename T, size_t Size > -constexpr vec faceforward(const vec& n, const vec& i, const vec& nref); +vec faceforward(const vec& n, const vec& i, const vec& nref); template < typename T, size_t Size > -constexpr vec reflect(const vec& i, const vec& n); +vec reflect(const vec& i, const vec& n); template < typename T, size_t Size > vec refract(const vec& i, const vec& n, T eta); @@ -1383,7 +1383,7 @@ vec refract(const vec& i, const vec& n, T eta); ```cpp template < typename T > -constexpr T dot(const qua& xs, const qua& ys); +T dot(const qua& xs, const qua& ys); template < typename T > T length(const qua& xs); @@ -1392,10 +1392,10 @@ template < typename T > T rlength(const qua& xs); template < typename T > -constexpr T length2(const qua& xs); +T length2(const qua& xs); template < typename T > -constexpr T rlength2(const qua& xs); +T rlength2(const qua& xs); template < typename T > T distance(const qua& xs, const qua& ys); @@ -1410,362 +1410,362 @@ qua normalize(const qua& xs); ```cpp template < arithmetic T > -constexpr bool any(T x) noexcept; +bool any(T x); template < arithmetic T > -constexpr bool all(T x) noexcept; +bool all(T x); template < arithmetic T > -constexpr bool approx(T x, T y) noexcept; +bool approx(T x, T y); template < arithmetic T > -constexpr bool approx(T x, T y, T epsilon) noexcept; +bool approx(T x, T y, T epsilon); template < arithmetic T > -constexpr bool less(T x, T y) noexcept; +bool less(T x, T y); template < arithmetic T > -constexpr bool less_equal(T x, T y) noexcept; +bool less_equal(T x, T y); template < arithmetic T > -constexpr bool greater(T x, T y) noexcept; +bool greater(T x, T y); template < arithmetic T > -constexpr bool greater_equal(T x, T y) noexcept; +bool greater_equal(T x, T y); template < arithmetic T > -constexpr bool equal_to(T x, T y) noexcept; +bool equal_to(T x, T y); template < arithmetic T > -constexpr bool not_equal_to(T x, T y) noexcept; +bool not_equal_to(T x, T y); ``` #### Vector ```cpp -template < typename T, std::size_t Size - , typename U = decltype(any(std::declval())) > -constexpr U any(const vec& xs); +template < typename T, size_t Size + , typename U = decltype(any(declval())) > +U any(const vec& xs); -template < typename T, std::size_t Size - , typename U = decltype(all(std::declval())) > -constexpr U all(const vec& xs); +template < typename T, size_t Size + , typename U = decltype(all(declval())) > +U all(const vec& xs); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(approx( - std::declval(), - std::declval())) > -constexpr vec approx(const vec& xs, const vec& ys); + declval(), + declval())) > +vec approx(const vec& xs, const vec& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(approx( - std::declval(), - std::declval(), - std::declval())) > -constexpr vec approx(const vec& xs, const vec& ys, T epsilon); + declval(), + declval(), + declval())) > +vec approx(const vec& xs, const vec& ys, T epsilon); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(less( - std::declval(), - std::declval())) > -constexpr vec less(const vec& xs, const vec& ys); + declval(), + declval())) > +vec less(const vec& xs, const vec& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(less_equal( - std::declval(), - std::declval())) > -constexpr vec less_equal(const vec& xs, const vec& ys); + declval(), + declval())) > +vec less_equal(const vec& xs, const vec& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(greater( - std::declval(), - std::declval())) > -constexpr vec greater(const vec& xs, const vec& ys); + declval(), + declval())) > +vec greater(const vec& xs, const vec& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(greater_equal( - std::declval(), - std::declval())) > -constexpr vec greater_equal(const vec& xs, const vec& ys); + declval(), + declval())) > +vec greater_equal(const vec& xs, const vec& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(equal_to( - std::declval(), - std::declval())) > -constexpr vec equal_to(const vec& xs, const vec& ys); + declval(), + declval())) > +vec equal_to(const vec& xs, const vec& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = decltype(not_equal_to( - std::declval(), - std::declval())) > -constexpr vec not_equal_to(const vec& xs, const vec& ys); + declval(), + declval())) > +vec not_equal_to(const vec& xs, const vec& ys); ``` #### Matrix ```cpp -template < typename T, std::size_t Size - , typename U = decltype(any(std::declval>())) > -constexpr U any(const mat& xs); +template < typename T, size_t Size + , typename U = decltype(any(declval>())) > +U any(const mat& xs); -template < typename T, std::size_t Size - , typename U = decltype(all(std::declval>())) > -constexpr U all(const mat& xs); +template < typename T, size_t Size + , typename U = decltype(all(declval>())) > +U all(const mat& xs); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(approx( - std::declval>(), - std::declval>()))::component_type > -constexpr mat approx(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat approx(const mat& xs, const mat& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(approx( - std::declval>(), - std::declval>(), - std::declval()))::component_type > -constexpr mat approx(const mat& xs, const mat& ys, T epsilon); + declval>(), + declval>(), + declval()))::component_type > +mat approx(const mat& xs, const mat& ys, T epsilon); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(less( - std::declval>(), - std::declval>()))::component_type > -constexpr mat less(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat less(const mat& xs, const mat& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(less_equal( - std::declval>(), - std::declval>()))::component_type > -constexpr mat less_equal(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat less_equal(const mat& xs, const mat& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(greater( - std::declval>(), - std::declval>()))::component_type > -constexpr mat greater(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat greater(const mat& xs, const mat& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(greater_equal( - std::declval>(), - std::declval>()))::component_type > -constexpr mat greater_equal(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat greater_equal(const mat& xs, const mat& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(equal_to( - std::declval>(), - std::declval>()))::component_type > -constexpr mat equal_to(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat equal_to(const mat& xs, const mat& ys); -template < typename T, std::size_t Size +template < typename T, size_t Size , typename U = typename decltype(not_equal_to( - std::declval>(), - std::declval>()))::component_type > -constexpr mat not_equal_to(const mat& xs, const mat& ys); + declval>(), + declval>()))::component_type > +mat not_equal_to(const mat& xs, const mat& ys); ``` #### Quaternion ```cpp template < typename T - , typename U = decltype(any(std::declval>())) > -constexpr U any(const qua& xs); + , typename U = decltype(any(declval>())) > +U any(const qua& xs); template < typename T - , typename U = decltype(all(std::declval>())) > -constexpr U all(const qua& xs); + , typename U = decltype(all(declval>())) > +U all(const qua& xs); template < typename T , typename U = typename decltype(approx( - std::declval>(), - std::declval>()))::component_type > -constexpr vec approx(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec approx(const qua& xs, const qua& ys); template < typename T , typename U = typename decltype(approx( - std::declval>(), - std::declval>(), - std::declval()))::component_type > -constexpr vec approx(const qua& xs, const qua& ys, T epsilon); + declval>(), + declval>(), + declval()))::component_type > +vec approx(const qua& xs, const qua& ys, T epsilon); template < typename T , typename U = typename decltype(less( - std::declval>(), - std::declval>()))::component_type > -constexpr vec less(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec less(const qua& xs, const qua& ys); template < typename T , typename U = typename decltype(less_equal( - std::declval>(), - std::declval>()))::component_type > -constexpr vec less_equal(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec less_equal(const qua& xs, const qua& ys); template < typename T , typename U = typename decltype(greater( - std::declval>(), - std::declval>()))::component_type > -constexpr vec greater(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec greater(const qua& xs, const qua& ys); template < typename T , typename U = typename decltype(greater_equal( - std::declval>(), - std::declval>()))::component_type > -constexpr vec greater_equal(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec greater_equal(const qua& xs, const qua& ys); template < typename T , typename U = typename decltype(equal_to( - std::declval>(), - std::declval>()))::component_type > -constexpr vec equal_to(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec equal_to(const qua& xs, const qua& ys); template < typename T , typename U = typename decltype(not_equal_to( - std::declval>(), - std::declval>()))::component_type > -constexpr vec not_equal_to(const qua& xs, const qua& ys); + declval>(), + declval>()))::component_type > +vec not_equal_to(const qua& xs, const qua& ys); ``` ### Matrix Functions ```cpp template < typename T > -constexpr mat transpose(const mat& m); +mat transpose(const mat& m); template < typename T > -constexpr mat transpose(const mat& m); +mat transpose(const mat& m); template < typename T > -constexpr mat transpose(const mat& m); +mat transpose(const mat& m); template < typename T > -constexpr T determinant(const mat& m); +T determinant(const mat& m); template < typename T > -constexpr T determinant(const mat& m); +T determinant(const mat& m); template < typename T > -constexpr T determinant(const mat& m); +T determinant(const mat& m); template < typename T > -constexpr mat inverse(const mat& m); +mat inverse(const mat& m); template < typename T > -constexpr mat inverse(const mat& m); +mat inverse(const mat& m); template < typename T > -constexpr mat inverse(const mat& m); +mat inverse(const mat& m); ``` ### Quaternion Functions ```cpp template < typename T > -constexpr qua conjugate(const qua& q); +qua conjugate(const qua& q); template < typename T > -constexpr qua inverse(const qua& q); +qua inverse(const qua& q); ``` ### Units ```cpp -template < typename T > inline constexpr vec zero2; -template < typename T > inline constexpr vec zero3; -template < typename T > inline constexpr vec zero4; +template < typename T > inline vec zero2; +template < typename T > inline vec zero3; +template < typename T > inline vec zero4; -template < typename T > inline constexpr vec unit2; -template < typename T > inline constexpr vec unit3; -template < typename T > inline constexpr vec unit4; +template < typename T > inline vec unit2; +template < typename T > inline vec unit3; +template < typename T > inline vec unit4; -template < typename T > inline constexpr vec unit2_x; -template < typename T > inline constexpr vec unit2_y; +template < typename T > inline vec unit2_x; +template < typename T > inline vec unit2_y; -template < typename T > inline constexpr vec unit3_x; -template < typename T > inline constexpr vec unit3_y; -template < typename T > inline constexpr vec unit3_z; +template < typename T > inline vec unit3_x; +template < typename T > inline vec unit3_y; +template < typename T > inline vec unit3_z; -template < typename T > inline constexpr vec unit4_x; -template < typename T > inline constexpr vec unit4_y; -template < typename T > inline constexpr vec unit4_z; -template < typename T > inline constexpr vec unit4_w; +template < typename T > inline vec unit4_x; +template < typename T > inline vec unit4_y; +template < typename T > inline vec unit4_z; +template < typename T > inline vec unit4_w; -template < typename T > inline constexpr mat zero2x2; -template < typename T > inline constexpr mat zero3x3; -template < typename T > inline constexpr mat zero4x4; +template < typename T > inline mat zero2x2; +template < typename T > inline mat zero3x3; +template < typename T > inline mat zero4x4; -template < typename T > inline constexpr mat unit2x2; -template < typename T > inline constexpr mat unit3x3; -template < typename T > inline constexpr mat unit4x4; +template < typename T > inline mat unit2x2; +template < typename T > inline mat unit3x3; +template < typename T > inline mat unit4x4; -template < typename T > inline constexpr mat identity2x2; -template < typename T > inline constexpr mat identity3x3; -template < typename T > inline constexpr mat identity4x4; +template < typename T > inline mat identity2x2; +template < typename T > inline mat identity3x3; +template < typename T > inline mat identity4x4; -template < typename T > inline constexpr qua qidentity; +template < typename T > inline qua qidentity; ``` ### Cast ```cpp template < arithmetic To, arithmetic From > -constexpr To cast_to(From x) noexcept; +To cast_to(From x); template < typename To, typename From, size_t Size > -constexpr vec cast_to(const vec& v); +vec cast_to(const vec& v); template < typename To, typename From, size_t Size > -constexpr mat cast_to(const mat& m); +mat cast_to(const mat& m); template < typename To, typename From > -constexpr qua cast_to(const qua& q); +qua cast_to(const qua& q); ``` ### Access ```cpp template < typename T, size_t Size > -constexpr T component(const vec& v, size_t index); +T component(const vec& v, size_t index); template < typename T, size_t Size > -constexpr vec component(vec v, size_t index, T x); +vec component(vec v, size_t index, T x); template < typename T, size_t Size > -constexpr vec row(const mat& m, size_t index); +vec row(const mat& m, size_t index); template < typename T, size_t Size > -constexpr mat row(mat m, size_t index, const vec& v); +mat row(mat m, size_t index, const vec& v); template < typename T, size_t Size > -constexpr vec column(const mat& m, size_t index); +vec column(const mat& m, size_t index); template < typename T, size_t Size > -constexpr mat column(const mat& m, size_t index, const vec& v); +mat column(const mat& m, size_t index, const vec& v); template < typename T > -constexpr T real(const qua& q); +T real(const qua& q); template < typename T > -constexpr qua real(qua q, T real); +qua real(qua q, T real); template < typename T > -constexpr vec imag(const qua& q); +vec imag(const qua& q); template < typename T > -constexpr qua imag(qua q, const vec& imag); +qua imag(qua q, const vec& imag); ``` ### Matrix Transform 3D ```cpp template < typename T > -constexpr mat translate(T x, T y, T z); +mat translate(T x, T y, T z); template < typename T > -constexpr mat translate(const mat& m, T x, T y, T z); +mat translate(const mat& m, T x, T y, T z); template < typename T > -constexpr mat translate(const vec& v); +mat translate(const vec& v); template < typename T > -constexpr mat translate(const mat& m, const vec& v); +mat translate(const mat& m, const vec& v); template < typename T > mat rotate(const qua& q); @@ -1798,16 +1798,16 @@ template < typename T > mat rotate_z(const mat& m, T angle); template < typename T > -constexpr mat scale(T x, T y, T z); +mat scale(T x, T y, T z); template < typename T > -constexpr mat scale(const mat& m, T x, T y, T z); +mat scale(const mat& m, T x, T y, T z); template < typename T > -constexpr mat scale(const vec& v); +mat scale(const vec& v); template < typename T > -constexpr mat scale(const mat& m, const vec& v); +mat scale(const mat& m, const vec& v); template < typename T > mat look_at_lh(const vec& eye, const vec& at, const vec& up); @@ -1820,16 +1820,16 @@ mat look_at_rh(const vec& eye, const vec& at, const vec& ```cpp template < typename T > -constexpr mat translate(T x, T y); +mat translate(T x, T y); template < typename T > -constexpr mat translate(const mat& m, T x, T y); +mat translate(const mat& m, T x, T y); template < typename T > -constexpr mat translate(const vec& v); +mat translate(const vec& v); template < typename T > -constexpr mat translate(const mat& m, const vec& v); +mat translate(const mat& m, const vec& v); template < typename T > mat rotate(T angle); @@ -1838,40 +1838,40 @@ template < typename T > mat rotate(const mat& m, T angle); template < typename T > -constexpr mat scale(T x, T y); +mat scale(T x, T y); template < typename T > -constexpr mat scale(const mat& m, T x, T y); +mat scale(const mat& m, T x, T y); template < typename T > -constexpr mat scale(const vec& v); +mat scale(const vec& v); template < typename T > -constexpr mat scale(const mat& m, const vec& v); +mat scale(const mat& m, const vec& v); template < typename T > -constexpr mat shear(T x, T y); +mat shear(T x, T y); template < typename T > -constexpr mat shear(const mat& m, T x, T y); +mat shear(const mat& m, T x, T y); template < typename T > -constexpr mat shear(const vec& v); +mat shear(const vec& v); template < typename T > -constexpr mat shear(const mat& m, const vec& v); +mat shear(const mat& m, const vec& v); template < typename T > -constexpr mat shear_x(T y); +mat shear_x(T y); template < typename T > -constexpr mat shear_x(const mat& m, T y); +mat shear_x(const mat& m, T y); template < typename T > -constexpr mat shear_y(T x); +mat shear_y(T x); template < typename T > -constexpr mat shear_y(const mat& m, T x); +mat shear_y(const mat& m, T x); ``` ### Matrix Projections @@ -1933,10 +1933,10 @@ template < typename T > vec rotate(const vec& v, T angle, const vec& axis); template < typename T, size_t Size > -constexpr vec project(const vec& v, const vec& normal); +vec project(const vec& v, const vec& normal); template < typename T, size_t Size > -constexpr vec perpendicular(const vec& v, const vec& normal); +vec perpendicular(const vec& v, const vec& normal); ``` ### Quaternion Transform