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:
parent
a87ce1bad7
commit
513532a93c
15 changed files with 1509 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue