mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
MATH: Make the Rotation3D/Transform constructors constexpr
This lets us have constexpr structs/classes that contain them
This commit is contained in:
parent
c1eedd42c5
commit
cfb9c4b251
@ -52,7 +52,7 @@ enum EulerOrder {
|
||||
template<class T>
|
||||
class Rotation3D : public Transform<T> {
|
||||
public:
|
||||
Rotation3D();
|
||||
constexpr Rotation3D();
|
||||
|
||||
/**
|
||||
* Constructor and assignment from buildFromEuler
|
||||
@ -101,7 +101,7 @@ public:
|
||||
};
|
||||
|
||||
template<class T>
|
||||
Rotation3D<T>::Rotation3D() : Transform<T>() {}
|
||||
constexpr Rotation3D<T>::Rotation3D() : Transform<T>() {}
|
||||
|
||||
template<class T>
|
||||
void Rotation3D<T>::buildFromEuler(const Angle &first, const Angle &second, const Angle &third, EulerOrder order) {
|
||||
|
@ -27,7 +27,7 @@ namespace Math {
|
||||
template<class T>
|
||||
class Transform {
|
||||
public:
|
||||
Transform() {}
|
||||
constexpr Transform() {}
|
||||
|
||||
protected:
|
||||
inline const T &getMatrix() const { return *static_cast<const T *>(this); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user