MCPcopy Create free account
hub / github.com/doldecomp/mkdd / stClampVecMin

Function stClampVecMin

src/Sato/stMath.cpp:45–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void stClampVecMin(TVec3f &vec, float clampval)
46{
47 if (vec.length() < clampval)
48 {
49 stVecNormalize(vec);
50 vec.scale((float)clampval);
51 }
52}
53
54// might use JMAFastSqrt instead, who knows
55float stspeedy_sqrtf(register float x)

Callers

nothing calls this directly

Calls 3

stVecNormalizeFunction · 0.85
lengthMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected