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

Function stClampVecMax

src/Sato/stMath.cpp:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void stClampVecMax(TVec3f &vec, float clampval)
37{
38 if (vec.length() > clampval)
39 {
40 stVecNormalize(vec);
41 vec.scale((float)clampval);
42 }
43}
44
45void stClampVecMin(TVec3f &vec, float clampval)
46{

Callers 1

moveNoChaseMethod · 0.85

Calls 3

stVecNormalizeFunction · 0.85
lengthMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected