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:
authorJoshua Leung <aligorith@gmail.com>2015-12-13 10:33:35 +0300
committerJoshua Leung <aligorith@gmail.com>2015-12-13 10:33:35 +0300
commitef2aecf2db981b5344e0d14e7f074f1742b0b2f7 (patch)
treed016e95050f10eda7bc44e1bdfa2f7c4fc0fc024 /intern/moto/include/MT_Quaternion.h
parentcf8980559fdc2e9731d9229512a554212173ea4f (diff)
parentd9ee88d126ddb59b68d2561694b522a99e4923b6 (diff)
Merge branch 'master' into GPencil_Editing_Stage3GPencil_Editing_Stage3
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 407d291348b..b7703fe57d6 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.5)) / d;
+ MT_Scalar s = sin(mt_angle * MT_Scalar(0.5f)) / d;
setValue(axis[0] * s, axis[1] * s, axis[2] * s,
- cos(mt_angle * MT_Scalar(0.5)));
+ cos(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.5));
- MT_Scalar sinYaw = sin(yaw * MT_Scalar(0.5));
- MT_Scalar cosPitch = cos(pitch * MT_Scalar(0.5));
- MT_Scalar sinPitch = sin(pitch * MT_Scalar(0.5));
- MT_Scalar cosRoll = cos(roll * MT_Scalar(0.5));
- MT_Scalar sinRoll = sin(roll * MT_Scalar(0.5));
+ 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));
setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,