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

Function ImFloor

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

Source from the content-addressed store, hash-verified

478static inline float ImLengthSqr(const ImVec4& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); }
479static 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; }
480static inline float ImFloor(float f) { return (float)(int)(f); }
481static inline float ImFloorSigned(float f) { return (float)((f >= 0 || (float)(int)f == f) ? (int)f : (int)f - 1); } // Decent replacement for floorf()
482static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); }
483static inline ImVec2 ImFloorSigned(const ImVec2& v) { return ImVec2(ImFloorSigned(v.x), ImFloorSigned(v.y)); }

Callers 15

TableUpdateLayoutMethod · 0.85
EndTableMethod · 0.85
TableHeaderMethod · 0.85
BeginColumnsMethod · 0.85
ScaleAllSizesMethod · 0.85
ScaleWindowFunction · 0.85
UpdateMouseWheelMethod · 0.85
BeginChildExMethod · 0.85
ApplyWindowSettingsFunction · 0.85
BeginMethod · 0.85

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected