Code cleanup: resolve minor Cycles todo's.

This commit is contained in:
Brecht Van Lommel
2016-01-29 20:10:38 +01:00
parent d5e929a9d3
commit e602fe60c0
2 changed files with 4 additions and 6 deletions

View File

@@ -313,8 +313,7 @@ ccl_device float fast_atanf(float x)
float r = s * madd(0.43157974f, t, 1.0f) /
madd(madd(0.05831938f, t, 0.76443945f), t, 1.0f);
if(a > 1.0f) {
/* TODO(sergey): Is it M_PI_2_F? */
r = 1.570796326794896557998982f - r;
r = M_PI_2_F - r;
}
return copysignf(r, x);
}
@@ -340,8 +339,7 @@ ccl_device float fast_atan2f(float y, float x)
if(b > a) {
/* Account for arg reduction. */
/* TODO(sergey): Is it M_PI_2_F? */
r = 1.570796326794896557998982f - r;
r = M_PI_2_F - r;
}
/* Test sign bit of x. */
if(__float_as_uint(x) & 0x80000000u) {
@@ -535,7 +533,7 @@ ccl_device float fast_safe_powf(float x, float y)
}
/* TODO(sergey): Check speed with our erf functions implementation from
* bsdf_microfaset.h.
* bsdf_microfacet.h.
*/
ccl_device_inline float fast_erff(float x)

View File

@@ -236,7 +236,7 @@ static void transform_decompose(Transform *decomp, const Transform *tfm)
} while(iteration < 100 && norm > 1e-4f);
if(transform_negative_scale(R))
R = R * transform_scale(-1.0f, -1.0f, -1.0f); /* todo: test scale */
R = R * transform_scale(-1.0f, -1.0f, -1.0f);
decomp->x = transform_to_quat(R);