more tests

This commit is contained in:
Jorijn van der Graaf 2026-03-25 00:42:04 +01:00
commit b582e168e3
6 changed files with 460 additions and 288 deletions

View file

@ -439,13 +439,13 @@ namespace Crafter {
return q;
}
constexpr static Vector<T, 4, Aligment> QuanternionFromEuler(T roll, T pitch, T yaw) {
T cr = std::cos(roll * 0.5);
T sr = std::sin(roll * 0.5);
T cp = std::cos(pitch * 0.5);
T sp = std::sin(pitch * 0.5);
T cy = std::cos(yaw * 0.5);
T sy = std::sin(yaw * 0.5);
constexpr static Vector<T, 4, Aligment> QuanternionFromEuler(T rollHalf, T pitchHalf, T yawHalf) {
T cr = std::cos(rollHalf);
T sr = std::sin(rollHalf);
T cp = std::cos(pitchHalf);
T sp = std::sin(pitchHalf);
T cy = std::cos(yawHalf);
T sy = std::sin(yawHalf);
return Vector<T, 4, Aligment>(
sr * cp * cy - cr * sp * sy,