Cleanup: use float math funcs

This commit is contained in:
Campbell Barton
2015-04-05 06:32:25 +10:00
parent cedd7cde44
commit 26979d45b1
3 changed files with 3 additions and 3 deletions

View File

@@ -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 */

View File

@@ -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

View File

@@ -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 */