Merge branch 'blender-v3.4-release'
This commit is contained in:
commit
191a3bf2ad
|
@ -5,11 +5,14 @@ float safe_divide(float a, float b)
|
|||
return (b != 0.0) ? a / b : 0.0;
|
||||
}
|
||||
|
||||
/* fmod function compatible with OSL using nvidia reference example. */
|
||||
/* fmod function compatible with OSL (copy from OSL/dual.h) */
|
||||
float compatible_fmod(float a, float b)
|
||||
{
|
||||
float c = (b != 0.0) ? fract(abs(a / b)) * abs(b) : 0.0;
|
||||
return (a < 0.0) ? -c : c;
|
||||
if (b != 0.0f) {
|
||||
int N = int(a / b);
|
||||
return a - N * b;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float compatible_pow(float x, float y)
|
||||
|
|
Loading…
Reference in New Issue