MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / ImClamp

Function ImClamp

extern/imgui/imgui_internal.h:464–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462template<typename T> static inline T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; }
463template<typename T> static inline T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; }
464template<typename T> static inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
465template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
466template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
467template<typename T> static inline T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 && (a < mn - b)) return mn; if (b > 0 && (a > mx - b)) return mx; return a + b; }

Callers 15

TableUpdateLayoutMethod · 0.85
TableSetColumnWidthMethod · 0.85
CalcListClippingMethod · 0.85
UpdateMouseWheelMethod · 0.85
CalcWindowAutoFitSizeFunction · 0.85
ClampWindowPosFunction · 0.85

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected