diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 22:23:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 22:23:30 +0400 |
commit | 9b948717b019fbd8e511595bd23ed1970b077085 (patch) | |
tree | 52e9203e26a4900b43bb82e699f6ca8a8a5b2cda /source/blender/blenkernel/intern/mask.c | |
parent | a18ead1521ccd14d45adc335dd1dddd89a71cc96 (diff) |
code cleanup: float <> double conversion.
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index da0fb895ec2..b7f4c4bd61e 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -378,8 +378,8 @@ float BKE_mask_spline_project_co(MaskSpline *spline, MaskSplinePoint *point, if (len_squared_v2(v1) > proj_eps_squared) { ang1 = angle_v2v2(v1, n1); - if (ang1 > M_PI / 2.0f) - ang1 = M_PI - ang1; + if (ang1 > (float)M_PI / 2.0f) + ang1 = (float)M_PI - ang1; if (ang < 0.0f || ang1 < ang) { ang = ang1; @@ -405,8 +405,8 @@ float BKE_mask_spline_project_co(MaskSpline *spline, MaskSplinePoint *point, if (len_squared_v2(v2) > proj_eps_squared) { ang2 = angle_v2v2(v2, n2); - if (ang2 > M_PI / 2.0f) - ang2 = M_PI - ang2; + if (ang2 > (float)M_PI / 2.0f) + ang2 = (float)M_PI - ang2; if (ang2 < ang) { ang = ang2; @@ -555,7 +555,7 @@ float BKE_mask_point_weight_scalar(MaskSpline *spline, MaskSplinePoint *point, c if (!bezt_next) { return bezt->weight; } - else if (u <= 0.0) { + else if (u <= 0.0f) { return bezt->weight; } else if (u >= 1.0f) { @@ -576,7 +576,7 @@ float BKE_mask_point_weight(MaskSpline *spline, MaskSplinePoint *point, const fl if (!bezt_next) { return bezt->weight; } - else if (u <= 0.0) { + else if (u <= 0.0f) { return bezt->weight; } else if (u >= 1.0f) { @@ -1805,7 +1805,7 @@ static void interp_weights_uv_v2_calc(float r_uv[2], const float pt[2], const fl float pt_on_line[2]; r_uv[0] = closest_to_line_v2(pt_on_line, pt, pt_a, pt_b); r_uv[1] = (len_v2v2(pt_on_line, pt) / len_v2v2(pt_a, pt_b)) * - ((line_point_side_v2(pt_a, pt_b, pt) < 0.0f) ? -1.0 : 1.0); /* this line only sets the sign */ + ((line_point_side_v2(pt_a, pt_b, pt) < 0.0f) ? -1.0f : 1.0f); /* this line only sets the sign */ } |