[Bf-blender-cvs] [26979d4] master: Cleanup: use float math funcs

Campbell Barton noreply at git.blender.org
Sat Apr 4 22:54:51 CEST 2015


Commit: 26979d45b196d2102f80b9048d90db885acaf675
Author: Campbell Barton
Date:   Sun Apr 5 06:32:25 2015 +1000
Branches: master
https://developer.blender.org/rB26979d45b196d2102f80b9048d90db885acaf675

Cleanup: use float math funcs

===================================================================

M	source/blender/blenkernel/intern/armature.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/sculpt_paint/paint_stroke.c

===================================================================

diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 9e209cb..dc11bcb 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -2238,7 +2238,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
 					}
 					
 					/* compute scale factor for xz axes from this value */
-					final_scale = sqrt(bulge);
+					final_scale = sqrtf(bulge);
 				}
 				else {
 					/* no scaling, so scale factor is simple */
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index f853fd9..9ee15f3 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -1964,7 +1964,7 @@ static float angle_2d_clockwise(const float p1[2], const float p2[2], const floa
 	v1[0] = p1[0] - p2[0];    v1[1] = p1[1] - p2[1];
 	v2[0] = p3[0] - p2[0];    v2[1] = p3[1] - p2[1];
 
-	return -atan2(v1[0] * v2[1] - v1[1] * v2[0], v1[0] * v2[0] + v1[1] * v2[1]);
+	return -atan2f(v1[0] * v2[1] - v1[1] * v2[0], v1[0] * v2[0] + v1[1] * v2[1]);
 }
 #endif
 
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index bfd429d..0db2259 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -1022,7 +1022,7 @@ static void paint_stroke_line_constrain (PaintStroke *stroke, float mouse[2])
 		float angle, len, res;
 		
 		sub_v2_v2v2(line, mouse, stroke->last_mouse_position);
-		angle = atan2(line[1], line[0]);
+		angle = atan2f(line[1], line[0]);
 		len = len_v2(line);
 		
 		/* divide angle by PI/4 */




More information about the Bf-blender-cvs mailing list