Fixing vec2.perp_dot and vec3.angle
This commit is contained in:
parent
e82ac511a5
commit
8673cd6701
2 changed files with 2 additions and 2 deletions
|
@ -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]
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue