MCPcopy Create free account
hub / github.com/RenderKit/embree / ImLinearSweep

Function ImLinearSweep

tutorials/common/imgui/imgui_internal.h:474–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; }
473static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
474static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
475static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
476static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
477IM_MSVC_RUNTIME_CHECKS_RESTORE

Callers 1

TabBarLayoutMethod · 0.85

Calls 2

ImMinFunction · 0.85
ImMaxFunction · 0.85

Tested by

no test coverage detected