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-11-19 05:10:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-19 05:10:05 +0400
commit4924abaad66acc966158b67f4843e12afde75352 (patch)
treed92bf99c39c13561457149a0d1616d2b4a0ae5aa /source/blender/blenlib
parent14ddf19ad20553f81e014e45846b370237df28c3 (diff)
replace fabs with fabsf where both input and output are floats.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/math_geom.c12
-rw-r--r--source/blender/blenlib/intern/math_rotation.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 6fc3891d1bd..1170e44b27b 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -134,9 +134,9 @@ float area_poly_v3(int nr, float verts[][3], const float normal[3])
int a, px=0, py=1;
/* first: find dominant axis: 0==X, 1==Y, 2==Z */
- x= (float)fabs(normal[0]);
- y= (float)fabs(normal[1]);
- z= (float)fabs(normal[2]);
+ x= fabsf(normal[0]);
+ y= fabsf(normal[1]);
+ z= fabsf(normal[2]);
max = MAX3(x, y, z);
if(max==y) py=2;
else if(max==x) {
@@ -1689,9 +1689,9 @@ static int barycentric_weights(const float v1[3], const float v2[3], const float
/* find best projection of face XY, XZ or YZ: barycentric weights of
the 2d projected coords are the same and faster to compute */
- xn= (float)fabs(n[0]);
- yn= (float)fabs(n[1]);
- zn= (float)fabs(n[2]);
+ xn= fabsf(n[0]);
+ yn= fabsf(n[1]);
+ zn= fabsf(n[2]);
if(zn>=xn && zn>=yn) {i= 0; j= 1;}
else if(yn>=xn && yn>=zn) {i= 0; j= 2;}
else {i= 1; j= 2;}
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 1637cd16161..e4664798f5d 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -1322,8 +1322,8 @@ void mat3_to_compatible_eulO(float eul[3], float oldrot[3], short order,float ma
compatible_eul(eul1, oldrot);
compatible_eul(eul2, oldrot);
- d1= (float)fabs(eul1[0]-oldrot[0]) + (float)fabs(eul1[1]-oldrot[1]) + (float)fabs(eul1[2]-oldrot[2]);
- d2= (float)fabs(eul2[0]-oldrot[0]) + (float)fabs(eul2[1]-oldrot[1]) + (float)fabs(eul2[2]-oldrot[2]);
+ d1= fabsf(eul1[0]-oldrot[0]) + fabsf(eul1[1]-oldrot[1]) + fabsf(eul1[2]-oldrot[2]);
+ d2= fabsf(eul2[0]-oldrot[0]) + fabsf(eul2[1]-oldrot[1]) + fabsf(eul2[2]-oldrot[2]);
/* return best, which is just the one with lowest difference */
if (d1 > d2)