Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Bernal <jbernalmartinez@gmail.com>2015-12-16 03:52:30 +0300
committerJorge Bernal <jbernalmartinez@gmail.com>2015-12-16 03:53:48 +0300
commitee59df521f2af10d6a34158a39bf21dd5ae847a3 (patch)
treef48810bfb9d6df03542517d575d61b46b3584d89 /intern/moto/include/MT_Quaternion.h
parent0c19a043e8198018ae794145fc4f1e78d5f00923 (diff)
BGE clean up: use float version of trigonometric functions
Diffstat (limited to 'intern/moto/include/MT_Quaternion.h')
-rw-r--r--intern/moto/include/MT_Quaternion.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/intern/moto/include/MT_Quaternion.h b/intern/moto/include/MT_Quaternion.h
index b7703fe57d6..6aabb1f2ed4 100644
--- a/intern/moto/include/MT_Quaternion.h
+++ b/intern/moto/include/MT_Quaternion.h
@@ -70,18 +70,18 @@ public:
void setRotation(const MT_Vector3& axis, MT_Scalar mt_angle) {
MT_Scalar d = axis.length();
MT_assert(!MT_fuzzyZero(d));
- MT_Scalar s = sin(mt_angle * MT_Scalar(0.5f)) / d;
+ MT_Scalar s = sinf(mt_angle * MT_Scalar(0.5f)) / d;
setValue(axis[0] * s, axis[1] * s, axis[2] * s,
- cos(mt_angle * MT_Scalar(0.5f)));
+ cosf(mt_angle * MT_Scalar(0.5f)));
}
void setEuler(MT_Scalar yaw, MT_Scalar pitch, MT_Scalar roll) {
- MT_Scalar cosYaw = cos(yaw * MT_Scalar(0.5f));
- MT_Scalar sinYaw = sin(yaw * MT_Scalar(0.5f));
- MT_Scalar cosPitch = cos(pitch * MT_Scalar(0.5f));
- MT_Scalar sinPitch = sin(pitch * MT_Scalar(0.5f));
- MT_Scalar cosRoll = cos(roll * MT_Scalar(0.5f));
- MT_Scalar sinRoll = sin(roll * MT_Scalar(0.5f));
+ MT_Scalar cosYaw = cosf(yaw * MT_Scalar(0.5f));
+ MT_Scalar sinYaw = sinf(yaw * MT_Scalar(0.5f));
+ MT_Scalar cosPitch = cosf(pitch * MT_Scalar(0.5f));
+ MT_Scalar sinPitch = sinf(pitch * MT_Scalar(0.5f));
+ MT_Scalar cosRoll = cosf(roll * MT_Scalar(0.5f));
+ MT_Scalar sinRoll = sinf(roll * MT_Scalar(0.5f));
setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,