Closed Gasparoken closed 2 years ago
Should this floor the size of the rectangle too? or should we call the function floorOrigin()?
I forgot to mention that there is no need to mention the issue in the code, the commit already will include that information.
Should this floor the size of the rectangle too? or should we call the function floorOrigin()?
Since Rect size (w, h) are greater than 0, I think isn't need to apply floor on size. Yes, we can call floorOrigin() if you like.
Oh I see, we can keep floor() in that case, I'll merge this ASAP 👍
Merged in https://github.com/aseprite/laf/commit/871adbe48bc85cff8de08d243df1f42fc9f1f7e9 with a test.
This 'floor' function is useful to adjust x, y float coordinates to the left most near integer for x, and top most near integer for y (instead of rounding towards 0). This function was included to solve issue aseprite/aseprite#2891
Example of use:
When 'floor' is not used: