operator * method

Quaternion operator * (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 Float32List otherStorage = other._qStorage;
  final double ow = otherStorage[3];
  final double oz = otherStorage[2];
  final double oy = otherStorage[1];
  final double ox = otherStorage[0];
  return new 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);
}