diff options
author | Hallam Roberts <MysteryPancake> | 2022-03-11 18:14:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-11 20:27:58 +0300 |
commit | 3da84d8b086bd2d09beb5bdb89ba6beddf1e1dd6 (patch) | |
tree | 698e6793ba776716a256abf10ed4b1623ade15eb /source/blender/blenkernel/intern/mask.c | |
parent | 62a0984d7290cbd6fd3acfa79d53765f97f93b0a (diff) |
Cleanup: use M_PI_2 and M_PI_4 where possible
The constant M_PI_4 is added to GLSL to ensure it works there too.
Differential Revision: https://developer.blender.org/D14288
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index da0f899001c..42e65a95404 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -609,7 +609,7 @@ float BKE_mask_spline_project_co(MaskSpline *spline, if (len_squared_v2(v1) > proj_eps_sq) { ang1 = angle_v2v2(v1, n1); - if (ang1 > (float)M_PI / 2.0f) { + if (ang1 > (float)M_PI_2) { ang1 = (float)M_PI - ang1; } @@ -635,7 +635,7 @@ float BKE_mask_spline_project_co(MaskSpline *spline, if (len_squared_v2(v2) > proj_eps_sq) { ang2 = angle_v2v2(v2, n2); - if (ang2 > (float)M_PI / 2.0f) { + if (ang2 > (float)M_PI_2) { ang2 = (float)M_PI - ang2; } |