cl-raylib icon indicating copy to clipboard operation
cl-raylib copied to clipboard

why draw-rectangle takes arguments of type integers instead of float?

Open Oleg-Harput opened this issue 1 year ago • 1 comments

draw-rectange arguments take integer but when we multiply it with get-frame-time the argument becomes float and we no longer put them into draw-rectangle.

Oleg-Harput avatar Jun 04 '23 17:06 Oleg-Harput

@Oleg-Harput It is decided by raylib, if you check the raylib.h for these signatures:

RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color);                        // Draw a color-filled rectangle

RLAPI float GetFrameTime(void);                                   // Get time in seconds for last frame drawn (delta time)

longlene avatar Jun 08 '23 22:06 longlene