Skip to content

Commit

Permalink
float cast to appease C++
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Oct 6, 2024
1 parent 843b5bf commit 90b4b0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clay.h
Original file line number Diff line number Diff line change
Expand Up @@ -1952,10 +1952,10 @@ void Clay__SizeContainersAlongAxis(bool xAxis) {

static inline Clay_BoundingBox Clay__BoundingBoxWithRoundedValues(float x, float y, float width, float height) {
return CLAY__INIT(Clay_BoundingBox) {
(int32_t)(x + (x > 0 ? 0.5f : -0.5f)),
(int32_t)(y + (y > 0 ? 0.5f : -0.5f)),
(int32_t)(width + (width > 0 ? 0.5f : -0.5f)),
(int32_t)(height + (height > 0 ? 0.5f : -0.5f))
(float)(int32_t)(x + (x > 0 ? 0.5f : -0.5f)),
(float)(int32_t)(y + (y > 0 ? 0.5f : -0.5f)),
(float)(int32_t)(width + (width > 0 ? 0.5f : -0.5f)),
(float)(int32_t)(height + (height > 0 ? 0.5f : -0.5f))
};
}

Expand Down

0 comments on commit 90b4b0d

Please sign in to comment.