From 90b4b0de26d9b92f706e0a24e44dbb64244c1b06 Mon Sep 17 00:00:00 2001 From: Nic Barker Date: Sun, 6 Oct 2024 13:32:55 +1300 Subject: [PATCH] float cast to appease C++ --- clay.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clay.h b/clay.h index 27ceb40..14797b5 100644 --- a/clay.h +++ b/clay.h @@ -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)) }; }