19 return (b != 0.0) ?
a / b : 0.0;
24 return vector((b[0] != 0.0) ?
a[0] / b[0] : 0.0,
25 (b[1] != 0.0) ?
a[1] / b[1] : 0.0,
26 (b[2] != 0.0) ?
a[2] / b[2] : 0.0);
31 return (b != 0.0) ? fmod(
a, b) : 0.0;
44 return min(
a, b) - h * h * h *
c * (1.0 / 6.0);
53 return (b != 0.0) ?
abs(
fract((
a - b) / (b * 2.0)) * b * 2.0 - b) : 0.0;
58 return (
a > 0.0) ?
sqrt(
a) : 0.0;
63 return (
a > 0.0 && b > 0.0) ?
log(
a) /
log(b) : 0.0;
68 float lenSquared =
dot(v_proj, v_proj);
69 return (lenSquared != 0.0) ? (
dot(
v, v_proj) / lenSquared) * v_proj :
vector(0.0);
81 return (range != 0.0) ? value - (range *
floor((value -
min) / range)) :
min;
95 return dot(reference, incident) < 0.0 ? vec : -vec;
100 float cx =
cos(euler[0]);
101 float cy =
cos(euler[1]);
102 float cz =
cos(euler[2]);
103 float sx =
sin(euler[0]);
104 float sy =
sin(euler[1]);
105 float sz =
sin(euler[2]);
106 matrix mat = matrix(1.0);
110 mat[1][0] = sy * sx * cz - cx * sz;
111 mat[1][1] = sy * sx * sz + cx * cz;
113 +mat[2][0] = sy * cx * cz + sx * sz;
114 mat[2][1] = sy * cx * sz - sx * cz;
ATTR_WARN_UNUSED_RESULT const BMVert * v
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
std::vector< ElementType, Eigen::aligned_allocator< ElementType > > vector
vector snap(vector a, vector b)
matrix euler_to_mat(point euler)
float safe_divide(float a, float b)
float wrap(float value, float max, float min)
vector project(vector v, vector v_proj)
float pingpong(float a, float b)
float safe_log(float a, float b)
float smoothmin(float a, float b, float c)
point compatible_faceforward(point vec, point incident, point reference)
float safe_modulo(float a, float b)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float dot(const float2 &a, const float2 &b)
ccl_device_inline float2 floor(const float2 &a)