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

Function ImSaturate

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

Source from the content-addressed store, hash-verified

454static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); }
455static inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); }
456static inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
457static inline float ImLengthSqr(const ImVec2& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y); }
458static inline float ImLengthSqr(const ImVec4& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); }
459static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = (lhs.x * lhs.x) + (lhs.y * lhs.y); if (d > 0.0f) return ImRsqrt(d); return fail_value; }

Callers 8

NavUpdateWindowingMethod · 0.85
ScrollbarExMethod · 0.85
ProgressBarMethod · 0.85
SliderBehaviorTMethod · 0.85
ColorPicker4Method · 0.85
PlotExMethod · 0.85
TabItemExMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected