23 return (FacT(1.0f) - t) * a + t *
b;
39 return ((a +
b - VecT(1)) /
b) *
b;
54 return (a +
b - VecT(1)) /
b;
66template<
typename VecT>
void min_max(VecT
vector, VecT &min_v, VecT &max_v)
81 return dot(
abs(a), VecT(1));
130 if (
dot(v1, v2) >= 0.0f) {
134 const VecT v2_n = -v2;
147 constexpr float threshold = 1e-35f;
148 if (out_length > threshold) {
149 out_length =
sqrt(out_length);
150 return vector / out_length;
176 return (a +
b) * 0.5f;
188 return ((
b.x >
b.y) ? ((
b.x >
b.z) ? 0 : 2) : ((
b.y >
b.z) ? 1 : 2));
197 return VecT(-v.y, v.x);
212 return float3(-v.y - v.z, v.x, v.x);
214 return float3(v.y, -v.x - v.z, v.y);
216 return float3(v.z, v.z, -v.x - v.y);
VecBase< float, D > normalize(VecOp< float, D >) RET
float dot(VecOp< float, D >, VecOp< float, D >) RET
constexpr T clamp(T, U, U) RET
float length(VecOp< float, D >) RET
void min_max(float value, float &min_v, float &max_v)
float endvalue_preserving_mix(float a, float b, float t)
int divide_ceil(int a, int b)
int ceil_to_multiple(int a, int b)
int midpoint(int a, int b)
Quaternion interpolate(Quaternion a, Quaternion b, float t)
float distance_squared(VecT a, VecT b)
float length_manhattan(VecT a)
VecT normalize_and_get_length(VecT vector, float &out_length)
float length_squared(VecT a)
float angle_normalized(VecT v1, VecT v2)
int dominant_axis(float3 a)
float distance_manhattan(VecT a, VecT b)