2
3
4
5
6
7
8
11#ifndef _MSTD_ARITHMETIC_TYPES_HPP_
12 #define _MSTD_ARITHMETIC_TYPES_HPP_
14 #include <mstd/config.hpp>
17_MSTD_WARNING(
"this is only available for c++17 and greater!");
20 #include <mstd/arithmetic_utils.hpp>
21 #include <mstd/management_types.hpp>
36 template<size_t N,
class T, std::enable_if_t<(N > 0 && std::is_arithmetic_v<T>),
bool> =
true>
39 template<
class T =
float, std::enable_if_t<std::is_arithmetic_v<T>,
bool> =
true>
42 template<size_t C, size_t R,
class T, std::enable_if_t<(C > 0 && R > 0 && std::is_arithmetic_v<T>),
bool> =
true>
46 #pragma region PREDEFINED_QUATS
51 using uquat = quat<
unsigned int>;
62 #pragma region PREDEFINED_VECS
63 #define _MSTD_MAKE_VECS_TYPES(len)
64 using vec##len = vec<len, float>;
65 using fvec##len = vec<len, float>;
66 using dvec##len = vec<len, double>;
67 using ldvec##len = vec<len, long double>;
68 using ivec##len = vec<len, int>;
69 using uvec##len = vec<len, unsigned int>;
70 using bvec##len = vec<len, bool>;
71 using cvec##len = vec<len, char>;
72 using ucvec##len = vec<len, unsigned char>;
73 using scvec##len = vec<len, signed char>;
74 using lvec##len = vec<len, long>;
75 using ulvec##len = vec<len, unsigned long>;
76 using llvec##len = vec<len, long long>;
77 using ullvec##len = vec<len, unsigned long long>
84 #pragma region PREDEFINED_MATS
85 #define _MSTD_MAKE_MAT_NOT_SQR_TYPES(col, row)
86 using mat##col##x##row = mat<col, row, float>;
87 using fmat##col##x##row = mat<col, row, float>;
88 using dmat##col##x##row = mat<col, row, double>;
89 using ldmat##col##x##row = mat<col, row, long double>;
90 using imat##col##x##row = mat<col, row, int>;
91 using umat##col##x##row = mat<col, row, unsigned int>;
92 using bmat##col##x##row = mat<col, row, bool>;
93 using cmat##col##x##row = mat<col, row, char>;
94 using ucmat##col##x##row = mat<col, row, unsigned char>;
95 using scmat##col##x##row = mat<col, row, signed char>;
96 using lmat##col##x##row = mat<col, row, long>;
97 using ulmat##col##x##row = mat<col, row, unsigned long>;
98 using llmat##col##x##row = mat<col, row, long long>;
99 using ullmat##col##x##row = mat<col, row, unsigned long long>
101 #define _MSTD_MAKE_TWO_MAT_NOT_SQR_TYPES(col, row)
109 template<size_t N,
class T>
112 #define _MSTD_MAKE_MAT_SQR_TYPES(len)
113 using mat##len = mat_sqr<len, float>;
114 using fmat##len = mat_sqr<len, float>;
115 using dmat##len = mat_sqr<len, double>;
116 using ldmat##len = mat_sqr<len, long double>;
117 using imat##len = mat_sqr<len, int>;
118 using umat##len = mat_sqr<len, unsigned int>;
119 using bmat##len = mat_sqr<len, bool>;
120 using cmat##len = mat_sqr<len, char>;
121 using ucmat##len = mat_sqr<len, unsigned char>;
122 using scmat##len = mat_sqr<len, signed char>;
123 using lmat##len = mat_sqr<len, long>;
124 using ulmat##len = mat_sqr<len, unsigned long>;
125 using llmat##len = mat_sqr<len, long long>;
126 using ullmat##len = mat_sqr<len, unsigned long long>
#define _MSTD_MAKE_MAT_SQR_TYPES(len)
Definition arithmetic_types.hpp:112
#define _MSTD_MAKE_MAT_NOT_SQR_TYPES(col, row)
Definition arithmetic_types.hpp:85
#define _MSTD_MAKE_TWO_MAT_NOT_SQR_TYPES(col, row)
Definition arithmetic_types.hpp:101
#define _MSTD_MAKE_VECS_TYPES(len)
Definition arithmetic_types.hpp:63
#define _MSTD_HAS_CXX17
Definition config.hpp:45
#define _MSTD_HAS_CXX20
Definition config.hpp:52
Definition arithmetic_types.hpp:23
quat< unsigned long > ulquat
Definition arithmetic_types.hpp:57
quat< float > fquat
Definition arithmetic_types.hpp:47
quat< long > lquat
Definition arithmetic_types.hpp:56
quat< unsigned long long > ullquat
Definition arithmetic_types.hpp:59
quat< double > dquat
Definition arithmetic_types.hpp:48
mat< N, N, T > mat_sqr
Definition arithmetic_types.hpp:110
quat< int > iquat
Definition arithmetic_types.hpp:50
quat< bool > bquat
Definition arithmetic_types.hpp:52
quat< long double > ldquat
Definition arithmetic_types.hpp:49
quat< long long > llquat
Definition arithmetic_types.hpp:58
quat< signed char > scquat
Definition arithmetic_types.hpp:55
quat< unsigned int > uquat
Definition arithmetic_types.hpp:51
quat< unsigned char > ucquat
Definition arithmetic_types.hpp:54
quat< char > cquat
Definition arithmetic_types.hpp:53