MCPcopy Create free account
hub / github.com/Hopson97/MineCraft-One-Week-Challenge / clamp

Function clamp

Source/Maths/GeneralMaths.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15float clamp(float x, float lowerlimit, float upperlimit)
16{
17 if (x < lowerlimit)
18 x = lowerlimit;
19 if (x > upperlimit)
20 x = upperlimit;
21 return x;
22}
23
24float smoothInterpolation(float bottomLeft, float topLeft, float bottomRight,
25 float topRight, float xMin, float xMax, float zMin,

Callers 4

saturateFunction · 0.85
vec<2, T, Q> saturateFunction · 0.85
vec<3, T, Q> saturateFunction · 0.85
vec<4, T, Q> saturateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected