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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 18:59:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 18:59:55 +0400
commit617e6a83bc89ca36e18bd06d851a31c010e11db2 (patch)
treed1347daa3d9a7bf51a0168048247cfe1ce13a4ee /source/blender/blenlib/intern/math_base_inline.c
parent8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a (diff)
object/paint/misc-files: floats were being implicitly promoted to doubles, adjust to use floats.
- also UV angle stretching was using radians->deg which wasn't needed.
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c8
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*/