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:
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,