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/freestyle/intern/winged_edge/Curvature.cpp | |
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/freestyle/intern/winged_edge/Curvature.cpp')
-rw-r--r-- | source/blender/freestyle/intern/winged_edge/Curvature.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp index fba3110907a..9086593a945 100644 --- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp +++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp @@ -474,10 +474,10 @@ inline static real angle(WOEdge *h) const Vec3r v = h->GetVec(); real sine = (n1 ^ n2) * v / v.norm(); if (sine >= 1.0) { - return M_PI / 2.0; + return M_PI_2; } if (sine <= -1.0) { - return -M_PI / 2.0; + return -M_PI_2; } return ::asin(sine); } |