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
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')
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c8
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c14
2 files changed, 11 insertions, 11 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*/
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 185b108ffe1..9a36f000624 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -472,9 +472,9 @@ MINLINE int equals_v4v4(const float *v1, const float *v2)
MINLINE int compare_v3v3(const float *v1, const float *v2, const float limit)
{
- if(fabs(v1[0]-v2[0])<limit)
- if(fabs(v1[1]-v2[1])<limit)
- if(fabs(v1[2]-v2[2])<limit)
+ if(fabsf(v1[0]-v2[0])<limit)
+ if(fabsf(v1[1]-v2[1])<limit)
+ if(fabsf(v1[2]-v2[2])<limit)
return 1;
return 0;
@@ -493,10 +493,10 @@ MINLINE int compare_len_v3v3(const float *v1, const float *v2, const float limit
MINLINE int compare_v4v4(const float *v1, const float *v2, const float limit)
{
- if(fabs(v1[0]-v2[0])<limit)
- if(fabs(v1[1]-v2[1])<limit)
- if(fabs(v1[2]-v2[2])<limit)
- if(fabs(v1[3]-v2[3])<limit)
+ if(fabsf(v1[0]-v2[0])<limit)
+ if(fabsf(v1[1]-v2[1])<limit)
+ if(fabsf(v1[2]-v2[2])<limit)
+ if(fabsf(v1[3]-v2[3])<limit)
return 1;
return 0;