1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

WIP matrix & rotation lua APIs

This commit is contained in:
Lars Mueller 2025-05-10 20:38:44 +02:00
parent a87ce1bad7
commit 513532a93c
15 changed files with 1509 additions and 5 deletions

View file

@ -91,6 +91,12 @@ public:
//! Calculates the dot product
inline f32 dotProduct(const quaternion &other) const;
//! Calculates the (unsigned) angle between two quaternions
inline f32 angleTo(const quaternion &other) const
{
return acosf(std::abs(dotProduct(other)));
}
//! Sets new quaternion
inline quaternion &set(f32 x, f32 y, f32 z, f32 w);