diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-12-13 04:50:30 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-12-13 04:56:30 +0300 |
commit | 0dcca6958913093948006d389ef9a777755db0f8 (patch) | |
tree | 2d0f56edf9f35eb401410d8376a1868fc9f9038a /intern/moto/include/MT_Scalar.h | |
parent | 6329e20cbb64910d0d9de357df76473f93399975 (diff) |
Moto Clean-up: double-promotion warnings
Diffstat (limited to 'intern/moto/include/MT_Scalar.h')
-rw-r--r-- | intern/moto/include/MT_Scalar.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/moto/include/MT_Scalar.h b/intern/moto/include/MT_Scalar.h index 6082e2d5368..93bd1a2e3ab 100644 --- a/intern/moto/include/MT_Scalar.h +++ b/intern/moto/include/MT_Scalar.h @@ -64,20 +64,20 @@ const MT_Scalar MT_EPSILON2(1.0e-20); const MT_Scalar MT_INFINITY(1.0e50); inline int MT_sign(MT_Scalar x) { - return x < 0.0 ? -1 : x > 0.0 ? 1 : 0; + return x < 0.0f ? -1 : x > 0.0f ? 1 : 0; } inline MT_Scalar MT_abs(MT_Scalar x) { return fabs(x); } -inline bool MT_fuzzyZero(MT_Scalar x) { return MT_abs(x) < MT_EPSILON; } -inline bool MT_fuzzyZero2(MT_Scalar x) { return MT_abs(x) < MT_EPSILON2; } +inline bool MT_fuzzyZero(MT_Scalar x) { return MT_abs(x) < (float)MT_EPSILON; } +inline bool MT_fuzzyZero2(MT_Scalar x) { return MT_abs(x) < (float)MT_EPSILON2; } inline MT_Scalar MT_radians(MT_Scalar x) { - return x * MT_RADS_PER_DEG; + return x * (float)MT_RADS_PER_DEG; } inline MT_Scalar MT_degrees(MT_Scalar x) { - return x * MT_DEGS_PER_RAD; + return x * (float)MT_DEGS_PER_RAD; } inline MT_Scalar MT_random() { |