MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / v_cmp_relative_equal

Function v_cmp_relative_equal

include/vecmath/dag_vecMath_common.h:103–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103VECTORCALL VECMATH_FINLINE vec4f v_cmp_relative_equal(vec4f a, vec4f b, vec4f max_diff, vec4f max_rel_diff)
104{
105 vec4f diff = v_abs(v_sub(a, b));
106 vec4f m = v_max(v_abs(a), v_abs(b));
107 return v_cmp_le(diff, v_min(max_diff, v_mul(m, max_rel_diff)));
108}
109
110VECTORCALL VECMATH_FINLINE bool v_is_relative_equal_vec3f(vec4f a, vec4f b)
111{

Callers 2

Calls 6

v_cmp_leFunction · 0.85
v_absFunction · 0.70
v_subFunction · 0.70
v_maxFunction · 0.70
v_minFunction · 0.70
v_mulFunction · 0.70

Tested by

no test coverage detected