diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-12-27 08:47:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-12-27 08:47:42 +0300 |
commit | 01c04333f5226703178fa027e8ce0de02dff982b (patch) | |
tree | 6bda94469610420981e5edf9ed233c915dec8629 /source/blender/blenlib/intern/math_base_inline.c | |
parent | 8d7b2d69cf5b8de0dab487b84b5f52ba308ddf4b (diff) |
Fix T43034: beautify-fill leaves zero area tri's
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 39116d6f30f..f5713824296 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -276,5 +276,18 @@ MINLINE float signf(float f) return (f < 0.f) ? -1.f : 1.f; } +MINLINE int signum_i_ex(float a, float eps) +{ + if (a > eps) return 1; + if (a < -eps) return -1; + else return 0; +} + +MINLINE int signum_i(float a) +{ + if (a > 0.0f) return 1; + if (a < 0.0f) return -1; + else return 0; +} #endif /* __MATH_BASE_INLINE_C__ */ |