summaryrefslogtreecommitdiffhomepage
path: root/examples/textures
diff options
context:
space:
mode:
authorRay <[email protected]>2021-10-03 11:44:59 +0200
committerRay <[email protected]>2021-10-03 11:44:59 +0200
commit239c37246a533681953554a303e68f25b9ceba17 (patch)
treef6d95aee2b43108a3e42772ff8e46a71e34df4ce /examples/textures
parent9882796df04218403fda23e2adbab8f347f88270 (diff)
downloadraylib-239c37246a533681953554a303e68f25b9ceba17.tar.gz
raylib-239c37246a533681953554a303e68f25b9ceba17.zip
WARNING: REVIEWED: Follow a set of conventions
CONVENTIONS: - Functions are always self-contained, no function use another raymath function inside, required code is directly re-implemented inside - Functions input parameters are always received by value - Functions use always a "result" variable for return - Functions are always defined inline - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
Diffstat (limited to 'examples/textures')
-rw-r--r--examples/textures/textures_poly.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/textures/textures_poly.c b/examples/textures/textures_poly.c
index ff728343..a2423a4b 100644
--- a/examples/textures/textures_poly.c
+++ b/examples/textures/textures_poly.c
@@ -53,7 +53,7 @@ int main(void)
Texture texture = LoadTexture("resources/cat.png");
- float ang = 0;
+ float angle = 0.0f;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@@ -63,11 +63,11 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
- ang++;
+ angle++;
Vector2 positions[MAX_POINTS] = { 0 };
- for (int i = 0; i < MAX_POINTS; i++) positions[i] = Vector2Rotate(points[i], ang);
+ for (int i = 0; i < MAX_POINTS; i++) positions[i] = Vector2Rotate(points[i], angle*DEG2RAD);
//----------------------------------------------------------------------------------
// Draw