MCPcopy Create free account
hub / github.com/antirez/ds4 / config_expect_bool

Function config_expect_bool

ds4.c:3875–3880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3873 int best = 0;
3874 float best_diff = fabsf(ax - dsv4_e2m1fn_value_cpu(0));
3875 for (int i = 1; i < 8; i++) {
3876 const float diff = fabsf(ax - dsv4_e2m1fn_value_cpu(i));
3877 if (diff < best_diff || (diff == best_diff && (i & 1) == 0 && (best & 1) != 0)) {
3878 best = i;
3879 best_diff = diff;
3880 }
3881 }
3882 return sign * dsv4_e2m1fn_value_cpu(best);
3883}

Callers 1

config_validate_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected