Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up number rounding #2862

Closed
wants to merge 1 commit into from
Closed

Clean up number rounding #2862

wants to merge 1 commit into from

Conversation

rokups
Copy link
Contributor

@rokups rokups commented Oct 22, 2019

Now it is more obvious what code is doing.

Add IM_ROUND() macro
Add ImRound(float) and ImRound(ImVec2)
Replace IM_FLOOR(n + 0.5f) with IM_ROUND(n)
Replace ImFloor(n + 0.5f) with ImRound(n)

Add IM_ROUND() macro
Add ImRound(float) and ImRound(ImVec2)
Replace IM_FLOOR(n + 0.5f) with IM_ROUND(n)
Replace ImFloor(n + 0.5f) with ImRound(n)
ocornut pushed a commit that referenced this pull request Oct 29, 2019
…2862)

Add IM_ROUND() macro
Replace IM_FLOOR(n + 0.5f) and ImFloor(n + 0.5f) with IM_ROUND(n)
@ocornut
Copy link
Owner

ocornut commented Oct 29, 2019

Should be merged now.
Actually removed ImRound() since it was so rarely used, just using IM_ROUND() instead.
Thanks!

@ocornut ocornut closed this Oct 29, 2019
@rokups rokups deleted the rk/IM_ROUND branch January 7, 2020 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants