-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforward.cpp
More file actions
36 lines (29 loc) · 768 Bytes
/
forward.cpp
File metadata and controls
36 lines (29 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
export module math:forward;
import <cstddef>;
export namespace math
{
// Maximum distance between floats for them to be considered equal. Applies to vectors and
// matrices.
constexpr float epsilon = 0.001f;
template<std::size_t N>
class Vector;
using Vec2 = Vector<2>;
using Vec3 = Vector<3>;
using Vec4 = Vector<4>;
template<std::size_t N>
constexpr Vector<N> operator-(Vector<N> lhs, const Vector<N>& rhs);
template<std::size_t M, std::size_t N>
class Matrix;
using Mat22 = Matrix<2, 2>;
using Mat2 = Mat22;
using Mat33 = Matrix<3, 3>;
using Mat3 = Mat33;
using Mat44 = Matrix<4, 4>;
using Mat4 = Mat44;
constexpr Mat3 rotationZ(const float theta);
inline Mat3 axesZ(const Vec3& axis);
}
export namespace graphics
{
class Framebuffer;
}