Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-11-26 13:53:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-26 13:53:26 +0400
commit13896063bccdf97f790db5a4048514a3bf0bf0b4 (patch)
treef65026d6a5d78c655c3f7c9e9c1cd0249d63afc4 /source/blender/blenlib/intern/math_base_inline.c
parent0570bdc13d297a80c702a69f72bf28f8d4e2e9b5 (diff)
Math library: minor additions sqrtf_signed and copy_v2_fl2
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index e6509db1c5e..c68ca3e3921 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -61,6 +61,11 @@ MINLINE double sqrt3d(double d)
else return exp(log( d) / 3.0);
}
+MINLINE float sqrtf_signed(float f)
+{
+ return (f >= 0.0f) ? sqrtf(f) : -sqrtf(-f);
+}
+
MINLINE float saacos(float fac)
{
if (UNLIKELY(fac <= -1.0f)) return (float)M_PI;