From d781e52ee042d5a7e371da0a6d7dc8996d23d804 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Feb 2023 17:03:21 +1100 Subject: [PATCH] Cleanup: use enum literals, order likely case first in polyfill_2d --- source/blender/blenlib/intern/polyfill_2d.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/blender/blenlib/intern/polyfill_2d.c b/source/blender/blenlib/intern/polyfill_2d.c index 85421c9bdc7..4f4166d8de8 100644 --- a/source/blender/blenlib/intern/polyfill_2d.c +++ b/source/blender/blenlib/intern/polyfill_2d.c @@ -160,14 +160,13 @@ static void pf_ear_tip_cut(PolyFill *pf, PolyIndex *pi_ear_tip); BLI_INLINE eSign signum_enum(float a) { - if (UNLIKELY(a == 0.0f)) { - return 0; - } if (a > 0.0f) { - return 1; + return CONVEX; } - - return -1; + if (UNLIKELY(a == 0.0f)) { + return TANGENTIAL; + } + return CONCAVE; } /**