diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-12-16 03:52:30 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-12-16 03:53:48 +0300 |
commit | ee59df521f2af10d6a34158a39bf21dd5ae847a3 (patch) | |
tree | f48810bfb9d6df03542517d575d61b46b3584d89 /intern/moto/include/MT_Vector2.inl | |
parent | 0c19a043e8198018ae794145fc4f1e78d5f00923 (diff) |
BGE clean up: use float version of trigonometric functions
Diffstat (limited to 'intern/moto/include/MT_Vector2.inl')
-rw-r--r-- | intern/moto/include/MT_Vector2.inl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/moto/include/MT_Vector2.inl b/intern/moto/include/MT_Vector2.inl index c975558b770..ed16025e733 100644 --- a/intern/moto/include/MT_Vector2.inl +++ b/intern/moto/include/MT_Vector2.inl @@ -48,7 +48,7 @@ GEN_INLINE MT_Scalar MT_Vector2::dot(const MT_Vector2& vv) const { } GEN_INLINE MT_Scalar MT_Vector2::length2() const { return dot(*this); } -GEN_INLINE MT_Scalar MT_Vector2::length() const { return sqrt(length2()); } +GEN_INLINE MT_Scalar MT_Vector2::length() const { return sqrtf(length2()); } GEN_INLINE MT_Vector2 MT_Vector2::absolute() const { return MT_Vector2(MT_abs(m_co[0]), MT_abs(m_co[1])); @@ -68,9 +68,9 @@ GEN_INLINE MT_Vector2 MT_Vector2::scaled(MT_Scalar xx, MT_Scalar yy) const { } GEN_INLINE MT_Scalar MT_Vector2::angle(const MT_Vector2& vv) const { - MT_Scalar s = sqrt(length2() * vv.length2()); + MT_Scalar s = sqrtf(length2() * vv.length2()); MT_assert(!MT_fuzzyZero(s)); - return acos(dot(vv) / s); + return acosf(dot(vv) / s); } |