Fixing vec2.perp_dot and vec3.angle

This commit is contained in:
maikklein 2013-06-16 02:08:16 +02:00
parent e82ac511a5
commit 8673cd6701
2 changed files with 2 additions and 2 deletions

View file

@ -269,7 +269,7 @@ impl<T:Copy + Real> Vec2<T> {
#[inline] #[inline]
pub fn angle(&self, other: &Vec2<T>) -> T { pub fn angle(&self, other: &Vec2<T>) -> T {
self.perp_dot(other).atan2(self.dot(other)) self.perp_dot(other).atan2(&self.dot(other))
} }
#[inline] #[inline]

View file

@ -293,7 +293,7 @@ impl<T:Copy + Real> Vec3<T> {
#[inline] #[inline]
pub fn angle(&self, other: &Vec3<T>) -> T { pub fn angle(&self, other: &Vec3<T>) -> T {
self.cross(other).length().atan2(self.dot(other)) self.cross(other).length().atan2(&self.dot(other))
} }
#[inline] #[inline]