diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-23 14:55:51 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-23 19:45:19 +0300 |
commit | b797a5ff7849b6c32c7aefeccbf52445c9ccc597 (patch) | |
tree | 49a228ee7bac8644aada6ed07f3feee9df6c72c2 /intern/cycles/util/util_math.h | |
parent | aa0602130bef65a11d068db7f3641a6f51fd3427 (diff) |
Cycles: Cleanup, move utility function to utility file
Was an old TODO, this function is handy for some math utilities as well.
Diffstat (limited to 'intern/cycles/util/util_math.h')
-rw-r--r-- | intern/cycles/util/util_math.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index 329b7f645c5..a41beab6285 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -1451,6 +1451,11 @@ ccl_device_inline float beta(float x, float y) #endif } +ccl_device_inline float xor_signmask(float x, int y) +{ + return __int_as_float(__float_as_int(x) ^ y); +} + /* projections */ ccl_device_inline float2 map_to_tube(const float3 co) { |