[Bf-blender-cvs] [e602fe6] master: Code cleanup: resolve minor Cycles todo's.
Brecht Van Lommel
noreply at git.blender.org
Sat Feb 6 12:22:28 CET 2016
Commit: e602fe60c042c7ff0a1ebbe2deab3b347f4ccc86
Author: Brecht Van Lommel
Date: Fri Jan 29 20:10:38 2016 +0100
Branches: master
https://developer.blender.org/rBe602fe60c042c7ff0a1ebbe2deab3b347f4ccc86
Code cleanup: resolve minor Cycles todo's.
===================================================================
M intern/cycles/util/util_math_fast.h
M intern/cycles/util/util_transform.cpp
===================================================================
diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h
index efe0698..deb2013 100644
--- a/intern/cycles/util/util_math_fast.h
+++ b/intern/cycles/util/util_math_fast.h
@@ -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)
diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp
index acaca69..79e1137 100644
--- a/intern/cycles/util/util_transform.cpp
+++ b/intern/cycles/util/util_transform.cpp
@@ -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);
More information about the Bf-blender-cvs
mailing list