mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +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
|
||||
TVector4& operator*= (const TVector4& v)
|
||||
{
|
||||
X = v.W * X + v.X * W + v.Y * Z - v.Z * Y;
|
||||
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;
|
||||
*this = *this * v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue