operator * method
- Quaternion other
this rotated by other.
Implementation
Quaternion operator *(Quaternion other) {
final double w = _qStorage[3];
final double z = _qStorage[2];
final double y = _qStorage[1];
final double x = _qStorage[0];
final Float64List otherStorage = other._qStorage;
final double ow = otherStorage[3];
final double oz = otherStorage[2];
final double oy = otherStorage[1];
final double ox = otherStorage[0];
return Quaternion(
w * ox + x * ow + y * oz - z * oy,
w * oy + y * ow + z * ox - x * oz,
w * oz + z * ow + x * oy - y * ox,
w * ow - x * ox - y * oy - z * oz,
);
}