float cast to appease C++

This commit is contained in:
Nic Barker 2024-10-06 13:32:55 +13:00
parent 843b5bfe89
commit 90b4b0de26

8
clay.h
View File

@ -1952,10 +1952,10 @@ void Clay__SizeContainersAlongAxis(bool xAxis) {
static inline Clay_BoundingBox Clay__BoundingBoxWithRoundedValues(float x, float y, float width, float height) { static inline Clay_BoundingBox Clay__BoundingBoxWithRoundedValues(float x, float y, float width, float height) {
return CLAY__INIT(Clay_BoundingBox) { return CLAY__INIT(Clay_BoundingBox) {
(int32_t)(x + (x > 0 ? 0.5f : -0.5f)), (float)(int32_t)(x + (x > 0 ? 0.5f : -0.5f)),
(int32_t)(y + (y > 0 ? 0.5f : -0.5f)), (float)(int32_t)(y + (y > 0 ? 0.5f : -0.5f)),
(int32_t)(width + (width > 0 ? 0.5f : -0.5f)), (float)(int32_t)(width + (width > 0 ? 0.5f : -0.5f)),
(int32_t)(height + (height > 0 ? 0.5f : -0.5f)) (float)(int32_t)(height + (height > 0 ? 0.5f : -0.5f))
}; };
} }