operator - method
Returns the difference of this number and another one.
Implementation
Quaternion operator -(Object other) {
if (other is Quaternion) {
return Quaternion(w - other.w, x - other.x, y - other.y, z - other.z);
} else if (other is num) {
return Quaternion(w - other, x, y, z);
} else {
throw ArgumentError.value(other, 'other', 'Invalid type');
}
}