diff --git a/src/vec2.rs b/src/vec2.rs index c94c4f0..5694d2d 100644 --- a/src/vec2.rs +++ b/src/vec2.rs @@ -269,7 +269,7 @@ impl Vec2 { #[inline] pub fn angle(&self, other: &Vec2) -> T { - self.perp_dot(other).atan2(self.dot(other)) + self.perp_dot(other).atan2(&self.dot(other)) } #[inline] diff --git a/src/vec3.rs b/src/vec3.rs index 1ceff1f..bda3878 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -293,7 +293,7 @@ impl Vec3 { #[inline] pub fn angle(&self, other: &Vec3) -> T { - self.cross(other).length().atan2(self.dot(other)) + self.cross(other).length().atan2(&self.dot(other)) } #[inline]