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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-21 22:23:45 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-21 22:23:45 +0400
commita1407ff34215e5a72de2988e06c54379a1843c14 (patch)
tree8ad3d63a087733b7c50910602ae079b388b5f89b /source/blender/blenlib/intern/arithb.c
parente4b79972776f9873fde045f4b93537309fba1817 (diff)
2.5:
* Windows fixes for texture filter & bump patches, thanks Jean-Michel Soler for noting. * Added sqrtf/sinf/fabsf/... fallback #ifdefs in BLI_arithb.h, those should be safe to use now. Replacing the double for the float version throughout the code can be done once, but would need proper testing.
Diffstat (limited to 'source/blender/blenlib/intern/arithb.c')
-rw-r--r--source/blender/blenlib/intern/arithb.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index f7313c8b37a..ce381a3ee7c 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -92,6 +92,26 @@ float sasqrt(float fac)
return (float)sqrt(fac);
}
+float saacosf(float fac)
+{
+ if(fac<= -1.0f) return (float)M_PI;
+ else if(fac>=1.0f) return 0.0f;
+ else return (float)acosf(fac);
+}
+
+float saasinf(float fac)
+{
+ if(fac<= -1.0f) return (float)-M_PI/2.0f;
+ else if(fac>=1.0f) return (float)M_PI/2.0f;
+ else return (float)asinf(fac);
+}
+
+float sasqrtf(float fac)
+{
+ if(fac<=0.0) return 0.0;
+ return (float)sqrtf(fac);
+}
+
float Normalize(float *n)
{
float d;