diff options
author | Kent Mein <mein@cs.umn.edu> | 2004-03-31 21:01:45 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2004-03-31 21:01:45 +0400 |
commit | d204f77251fb7559ea8ee1186a4796c26706c56b (patch) | |
tree | 1742fa56902fb0b377f65d21d9a2f57f7a6304b9 /extern | |
parent | fd470d96238aa4621ad652949a71ba7fd780707b (diff) |
Added #if defined (__sparc) || (__APPLE__)
bits around sqrtf and friends. ON these two platforms
they are overloaded so its just sqrt not sqrtf.
Kent
Diffstat (limited to 'extern')
-rwxr-xr-x | extern/solid/include/MT_Scalar.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/extern/solid/include/MT_Scalar.h b/extern/solid/include/MT_Scalar.h index 870aa6d38a1..63090d06fc0 100755 --- a/extern/solid/include/MT_Scalar.h +++ b/extern/solid/include/MT_Scalar.h @@ -45,6 +45,24 @@ struct Scalar_traits<float> { static float max() { return FLT_MAX; } static float random() { return float(GEN_rand()) / float(GEN_RAND_MAX); } +#if defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__APPLE__) + static float sqrt(float x) { return ::sqrt(x); } + static float abs(float x) { return ::fabs(x); } + + static float cos(float x) { return ::cos(x); } + static float sin(float x) { return ::sin(x); } + static float tan(float x) { return ::tan(x); } + + static float acos(float x) { return ::acos(x); } + static float asin(float x) { return ::asin(x); } + static float atan(float x) { return ::atan(x); } + static float atan2(float x, float y) { return ::atan2(x, y); } + + static float exp(float x) { return ::exp(x); } + static float log(float x) { return ::log(x); } + static float pow(float x, float y) { return ::pow(x, y); } + +#else static float sqrt(float x) { return ::sqrtf(x); } static float abs(float x) { return ::fabsf(x); } @@ -60,6 +78,7 @@ struct Scalar_traits<float> { static float exp(float x) { return ::expf(x); } static float log(float x) { return ::logf(x); } static float pow(float x, float y) { return ::powf(x, y); } +#endif }; template<> |