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:
authorThomas Dinges <blender@dingto.org>2013-05-12 18:13:29 +0400
committerThomas Dinges <blender@dingto.org>2013-05-12 18:13:29 +0400
commit7636aeffe1674ea2281869a0d81cbe20ee42e8b9 (patch)
tree61ab2f2c9bd74ff35d074e4f27a0885b6ac98a32 /intern/cycles/kernel/kernel_montecarlo.h
parent469979f9cb08640fbc00a43b59eee459460e74e1 (diff)
Cycles / Math:
* Add M_2PI_F and M_4PI_F constants and use them inside the codebase.
Diffstat (limited to 'intern/cycles/kernel/kernel_montecarlo.h')
-rw-r--r--intern/cycles/kernel/kernel_montecarlo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_montecarlo.h b/intern/cycles/kernel/kernel_montecarlo.h
index fb66501c336..707c769f0cd 100644
--- a/intern/cycles/kernel/kernel_montecarlo.h
+++ b/intern/cycles/kernel/kernel_montecarlo.h
@@ -95,7 +95,7 @@ __device_inline void sample_uniform_hemisphere(const float3 N,
{
float z = randu;
float r = sqrtf(max(0.0f, 1.0f - z*z));
- float phi = 2.0f * M_PI_F * randv;
+ float phi = M_2PI_F * randv;
float x = r * cosf(phi);
float y = r * sinf(phi);
@@ -111,7 +111,7 @@ __device_inline void sample_uniform_cone(const float3 N, float angle,
{
float z = cosf(angle*randu);
float r = sqrtf(max(0.0f, 1.0f - z*z));
- float phi = 2.0f * M_PI_F * randv;
+ float phi = M_2PI_F * randv;
float x = r * cosf(phi);
float y = r * sinf(phi);