From f16b51198b350a58340630a6f55ff857993ad471 Mon Sep 17 00:00:00 2001 From: Mapt04 Date: Thu, 14 Dec 2023 16:00:21 -0300 Subject: [PATCH] Make centering clearer in 'Texture source and destination rectangles' example --- examples/textures/textures_srcrec_dstrec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/textures/textures_srcrec_dstrec.c b/examples/textures/textures_srcrec_dstrec.c index caf8f64b3..d6bf493ef 100644 --- a/examples/textures/textures_srcrec_dstrec.c +++ b/examples/textures/textures_srcrec_dstrec.c @@ -39,7 +39,7 @@ int main(void) Rectangle destRec = { screenWidth/2.0f, screenHeight/2.0f, frameWidth*2.0f, frameHeight*2.0f }; // Origin of the texture (rotation/scale point), it's relative to destination rectangle size - Vector2 origin = { (float)frameWidth, (float)frameHeight }; + Vector2 origin = { destRec.width/2, destRec.height/2 }; int rotation = 0;