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

Function ImSwap

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

Source from the content-addressed store, hash-verified

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; }
468template<typename T> static inline T ImSubClampOverflow(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; }
469// - Misc maths helpers

Callers 9

ColorConvertRGBtoHSVMethod · 0.85
ScaleRatioFromValueTMethod · 0.85
ScaleValueFromRatioTMethod · 0.85
TempInputScalarMethod · 0.85
InputTextExMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected