MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ImAddClampOverflow

Function ImAddClampOverflow

KBotExt/imgui/imgui_internal.h:447–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
446template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
447template<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; }
448template<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; }
449// - Misc maths helpers
450static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); }

Callers 1

DataTypeApplyOpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected