From 0d3f0ff08e2066de33165fa3153fd081fc394aaa Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 25 Sep 2010 11:30:46 +0000 Subject: Fix #23901: displace node not working with negative values. --- source/blender/blenlib/intern/math_base_inline.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenlib/intern/math_base_inline.c') diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index b364ff73e4f..fc413457122 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -122,5 +122,10 @@ MINLINE float maxf(float a, float b) return (a > b)? a: b; } +MINLINE float signf(float f) +{ + return (f < 0.f)? -1.f: 1.f; +} + #endif /* BLI_MATH_BASE_INLINE */ -- cgit v1.2.3