diff options
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index db1683efc98..d37f1d6c5f0 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -45,7 +45,7 @@ MINLINE float sqrt3f(float f) { - if(f==0.0) return 0; + if(f==0.0f) return 0.0f; if(f<0) return (float)(-exp(log(-f)/3)); else return (float)(exp(log(f)/3)); } @@ -73,7 +73,7 @@ MINLINE float saasin(float fac) MINLINE float sasqrt(float fac) { - if(fac<=0.0) return 0.0; + if(fac<=0.0f) return 0.0f; return (float)sqrt(fac); } @@ -93,7 +93,7 @@ MINLINE float saasinf(float fac) MINLINE float sasqrtf(float fac) { - if(fac<=0.0) return 0.0; + if(fac<=0.0f) return 0.0f; return (float)sqrtf(fac); } @@ -108,7 +108,7 @@ MINLINE float interpf(float target, float origin, float fac) * the distance gets very high, 180d would be inf, but this case isn't valid */ MINLINE float shell_angle_to_dist(const float angle) { - return (angle < SMALL_NUMBER) ? 1.0f : fabsf(1.0f / cosf(angle)); + return (angle < (float)SMALL_NUMBER) ? 1.0f : fabsf(1.0f / cosf(angle)); } /* used for zoom values*/ |