mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-09 19:01:09 +00:00
- fixed quaternion multiply-assign operator.
This must go through a temporary because otherwise it'd overwrite its own factors.
This commit is contained in:
parent
c55dfbcddd
commit
3e405c5215
1 changed files with 1 additions and 4 deletions
|
@ -849,10 +849,7 @@ struct TVector4
|
||||||
// Multiply as Quaternion
|
// Multiply as Quaternion
|
||||||
TVector4& operator*= (const TVector4& v)
|
TVector4& operator*= (const TVector4& v)
|
||||||
{
|
{
|
||||||
X = v.W * X + v.X * W + v.Y * Z - v.Z * Y;
|
*this = *this * v;
|
||||||
Y = v.W * Y + v.Y * W + v.Z * X - v.X * Z;
|
|
||||||
Z = v.W * Z + v.Z * W + v.X * Y - v.Y * X;
|
|
||||||
W = v.W * W - v.X * X - v.Y * Y - v.Z * Z;
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue