diff options
Diffstat (limited to 'intern/moto/include/MT_Vector3.inl')
-rw-r--r-- | intern/moto/include/MT_Vector3.inl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/moto/include/MT_Vector3.inl b/intern/moto/include/MT_Vector3.inl index 8a2328fa295..7994bf7c55c 100644 --- a/intern/moto/include/MT_Vector3.inl +++ b/intern/moto/include/MT_Vector3.inl @@ -52,7 +52,7 @@ GEN_INLINE MT_Scalar MT_Vector3::dot(const MT_Vector3& v) const { } GEN_INLINE MT_Scalar MT_Vector3::length2() const { return dot(*this); } -GEN_INLINE MT_Scalar MT_Vector3::length() const { return sqrt(length2()); } +GEN_INLINE MT_Scalar MT_Vector3::length() const { return sqrtf(length2()); } GEN_INLINE MT_Vector3 MT_Vector3::absolute() const { return MT_Vector3(MT_abs(m_co[0]), MT_abs(m_co[1]), MT_abs(m_co[2])); @@ -93,9 +93,9 @@ GEN_INLINE MT_Vector3 MT_Vector3::scaled(MT_Scalar xx, MT_Scalar yy, MT_Scalar z } GEN_INLINE MT_Scalar MT_Vector3::angle(const MT_Vector3& v) const { - MT_Scalar s = sqrt(length2() * v.length2()); + MT_Scalar s = sqrtf(length2() * v.length2()); MT_assert(!MT_fuzzyZero(s)); - return acos(dot(v) / s); + return acosf(dot(v) / s); } GEN_INLINE MT_Vector3 MT_Vector3::cross(const MT_Vector3& v) const { @@ -117,9 +117,9 @@ GEN_INLINE int MT_Vector3::closestAxis() const { GEN_INLINE MT_Vector3 MT_Vector3::random() { MT_Scalar z = MT_Scalar(2.0f) * MT_random() - MT_Scalar(1.0f); - MT_Scalar r = sqrt(MT_Scalar(1.0f) - z * z); + MT_Scalar r = sqrtf(MT_Scalar(1.0f) - z * z); MT_Scalar t = (float)MT_2_PI * MT_random(); - return MT_Vector3(r * cos(t), r * sin(t), z); + return MT_Vector3(r * cosf(t), r * sinf(t), z); } GEN_INLINE MT_Scalar MT_dot(const MT_Vector3& v1, const MT_Vector3& v2) { |