swap round for floor to appease compiler

This commit is contained in:
Nic Barker 2025-05-21 16:36:19 +12:00
parent e93a83812e
commit b2ffb2f0e5

View file

@ -88,10 +88,10 @@ void Clay_Console_Render(Clay_RenderCommandArray renderCommands, int width, int
for (int j = 0; j < renderCommands.length; j++) { for (int j = 0; j < renderCommands.length; j++) {
Clay_RenderCommand *renderCommand = Clay_RenderCommandArray_Get(&renderCommands, j); Clay_RenderCommand *renderCommand = Clay_RenderCommandArray_Get(&renderCommands, j);
Clay_BoundingBox boundingBox = (Clay_BoundingBox) { Clay_BoundingBox boundingBox = (Clay_BoundingBox) {
.x = roundf((renderCommand->boundingBox.x / columnWidth)), .x = floorf((renderCommand->boundingBox.x / columnWidth) + 0.5),
.y = roundf((renderCommand->boundingBox.y / columnWidth)), .y = floorf((renderCommand->boundingBox.y / columnWidth) + 0.5),
.width = roundf((renderCommand->boundingBox.width / columnWidth)), .width = floorf((renderCommand->boundingBox.width / columnWidth) + 0.5),
.height = roundf((renderCommand->boundingBox.height / columnWidth)), .height = floorf((renderCommand->boundingBox.height / columnWidth) + 0.5),
}; };
switch (renderCommand->commandType) { switch (renderCommand->commandType) {
case CLAY_RENDER_COMMAND_TYPE_TEXT: { case CLAY_RENDER_COMMAND_TYPE_TEXT: {