From 50059c52f576f2708b48113e4a965d0e087e2ce6 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 12 Sep 2011 20:07:16 -0400 Subject: [PATCH] oops, dumb oversight in regarding std::sincos --- include/mitsuba/core/stl.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/mitsuba/core/stl.h b/include/mitsuba/core/stl.h index 9cc5cf2d..47b09a98 100644 --- a/include/mitsuba/core/stl.h +++ b/include/mitsuba/core/stl.h @@ -148,15 +148,13 @@ namespace std { #else inline void sincos(float theta, float *_sin, float *_cos) { - float sinValue = sinf(theta); - *_sin = sinValue; - *_cos = sqrtf(std::max(0.0f, 1.0f-sinValue*sinValue)); + *_sin = sinf(theta); + *_cos = cosf(theta); } inline void sincos(double theta, double *_sin, double *_cos) { - double sinValue = sin(theta); - *_sin = sinValue; - *_cos = sqrt(std::max(0.0, 1.0-sinValue*sinValue)); + *_sin = sin(theta); + *_cos = cos(theta); } #endif };