Files
ss/include/egg/math/eggRotation.h
T
elijah-thomas774 133ac12fcf small fixup
2025-05-25 15:46:31 -04:00

51 lines
856 B
C++

#ifndef EGG_ROTATION_H
#define EGG_ROTATION_H
#include "egg/math/eggMath.h"
namespace EGG {
template <typename T>
struct Rotation {
Rotation() {}
Rotation(T val) : mRot(val) {}
Rotation(const Rotation &other) {
mRot = other.mRot;
}
Rotation &operator=(const Rotation &other) {
mRot = other.mRot;
return *this;
}
Rotation &operator=(T val) {
mRot = val;
return *this;
}
operator T() const {
return mRot;
}
Rotation &operator-=(T val) {
mRot -= val;
return *this;
}
Rotation &operator+=(T val) {
mRot -= val;
return *this;
}
const T cos() const {
return Math<T>::cos(*this);
}
const T sin() const {
return Math<T>::sin(*this);
}
protected:
T mRot;
};
} // namespace EGG
#endif