mirror of
https://github.com/okalachev/flix.git
synced 2025-07-28 20:08:53 +00:00
Add missing equals and non-equals operators for quaternion lib
This commit is contained in:
parent
52d31ba7a5
commit
9229b743eb
@ -148,6 +148,14 @@ public:
|
|||||||
w * q.z + z * q.w + x * q.y - y * q.x);
|
w * q.z + z * q.w + x * q.y - y * q.x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator == (const Quaternion& q) const {
|
||||||
|
return w == q.w && x == q.x && y == q.y && z == q.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator != (const Quaternion& q) const {
|
||||||
|
return !(*this == q);
|
||||||
|
}
|
||||||
|
|
||||||
Quaternion inversed() const {
|
Quaternion inversed() const {
|
||||||
float normSqInv = 1 / (w * w + x * x + y * y + z * z);
|
float normSqInv = 1 / (w * w + x * x + y * y + z * z);
|
||||||
return Quaternion(
|
return Quaternion(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user