diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-02 19:46:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-02 19:46:45 +0400 |
commit | fed1b8b16d2d6a56aeea496677f24b286672bb74 (patch) | |
tree | 542e5f6bcfef3491e61f745b4aa1cee769dff63c /source/blender/blenkernel/intern/mask.c | |
parent | dda63375b2fa581197e909c45116ac17b5f8782c (diff) |
Code cleanup: suffix vars to make obvious they are squared
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index 997c444982c..131e383a8a2 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -358,8 +358,8 @@ void BKE_mask_spline_direction_switch(MaskLayer *masklay, MaskSpline *spline) float BKE_mask_spline_project_co(MaskSpline *spline, MaskSplinePoint *point, float start_u, const float co[2], const eMaskSign sign) { - const float proj_eps = 1e-3; - const float proj_eps_squared = proj_eps * proj_eps; + const float proj_eps = 1e-3; + const float proj_eps_sq = proj_eps * proj_eps; const int N = 1000; float u = -1.0f, du = 1.0f / N, u1 = start_u, u2 = start_u; float ang = -1.0f; @@ -381,7 +381,7 @@ float BKE_mask_spline_project_co(MaskSpline *spline, MaskSplinePoint *point, ((sign == MASK_PROJ_POS) && (dot_v2v2(v1, n1) >= 0.0f))) { - if (len_squared_v2(v1) > proj_eps_squared) { + if (len_squared_v2(v1) > proj_eps_sq) { ang1 = angle_v2v2(v1, n1); if (ang1 > (float)M_PI / 2.0f) ang1 = (float)M_PI - ang1; @@ -408,7 +408,7 @@ float BKE_mask_spline_project_co(MaskSpline *spline, MaskSplinePoint *point, ((sign == MASK_PROJ_POS) && (dot_v2v2(v2, n2) >= 0.0f))) { - if (len_squared_v2(v2) > proj_eps_squared) { + if (len_squared_v2(v2) > proj_eps_sq) { ang2 = angle_v2v2(v2, n2); if (ang2 > (float)M_PI / 2.0f) ang2 = (float)M_PI - ang2; |