Closed thenlevy closed 4 years ago
Quoting https://github.com/termhn/ultraviolet/blob/master/src/rotor.rs
/// Rotates a vector by this rotor. /// /// `self` *must* be normalized! #[inline] pub fn rotate_vec(self, vec: &mut $vt) { let fx = self.s * vec.x + self.bv.xy * vec.y; let fy = self.s * vec.y - (self.bv.xy * vec.x); vec.x = self.s * fx - (self.bv.xy * fy); vec.y = self.s * fy + self.bv.xy * fx; }
If I call s = self.s, b = self.bv.xy, then vec.x becomes
s = self.s
b = self.bv.xy
vec.x = s * fx - b * fy vec.x = s * s * vec.x + s*b * vec.y - b * s * vec.y + b * b * vec.x vec.x = self.mag() * vec.x
Which is definitely not what we want.. I don't know what the correct formula is however
Fixed by #88
Also released in 0.7.5 @thenlevy @austinliew
0.7.5
Quoting https://github.com/termhn/ultraviolet/blob/master/src/rotor.rs
If I call
s = self.s
,b = self.bv.xy
, then vec.x becomesWhich is definitely not what we want.. I don't know what the correct formula is however