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

Method Sign

include/daScript/simulate/sim_policy.h:283–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 struct SimPolicy_MathVec {
282
283 static __forceinline vec4f Sign ( vec4f a, Context &, LineInfo * ) {
284 return v_or(v_and(v_splats(1.0f), v_cmp_gt(a, v_zero())), v_and(v_splats(-1.0f), v_cmp_lt(a, v_zero())));
285 }
286
287 static __forceinline vec4f Abs ( vec4f a, Context &, LineInfo * ) { return v_abs(a); }
288 static __forceinline vec4f Floor ( vec4f a, Context &, LineInfo * ) { return v_floor(a); }

Callers

nothing calls this directly

Calls 6

v_cmp_ltFunction · 0.85
v_orFunction · 0.50
v_andFunction · 0.50
v_splatsFunction · 0.50
v_cmp_gtFunction · 0.50
v_zeroFunction · 0.50

Tested by

no test coverage detected