diff options
| author | Ray <[email protected]> | 2020-12-19 19:27:31 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-12-19 19:27:31 +0100 |
| commit | 2374281204be800de71484bd8712e9f098f7fc44 (patch) | |
| tree | a70ae3b994f5ab079a05dbea315597e8e2fb3901 /src/shapes.c | |
| parent | 015e715278ab9c4abce722bbee705a1b0f788ca2 (diff) | |
| download | raylib-2374281204be800de71484bd8712e9f098f7fc44.tar.gz raylib-2374281204be800de71484bd8712e9f098f7fc44.zip | |
Avoid *Rec suffix in some variables
Pefixing/Suffixing some data type identifier in the variables is not a convention used in raylib, just reviewed it for consistency...
Still, I kept the *Rec suffix in some functions.
Diffstat (limited to 'src/shapes.c')
| -rw-r--r-- | src/shapes.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/shapes.c b/src/shapes.c index 83eca0ef..f5447241 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -1474,7 +1474,7 @@ bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec) // Get collision rectangle for two rectangles collision Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2) { - Rectangle retRec = { 0, 0, 0, 0 }; + Rectangle rec = { 0, 0, 0, 0 }; if (CheckCollisionRecs(rec1, rec2)) { @@ -1485,57 +1485,57 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2) { if (rec1.y <= rec2.y) { - retRec.x = rec2.x; - retRec.y = rec2.y; - retRec.width = rec1.width - dxx; - retRec.height = rec1.height - dyy; + rec.x = rec2.x; + rec.y = rec2.y; + rec.width = rec1.width - dxx; + rec.height = rec1.height - dyy; } else { - retRec.x = rec2.x; - retRec.y = rec1.y; - retRec.width = rec1.width - dxx; - retRec.height = rec2.height - dyy; + rec.x = rec2.x; + rec.y = rec1.y; + rec.width = rec1.width - dxx; + rec.height = rec2.height - dyy; } } else { if (rec1.y <= rec2.y) { - retRec.x = rec1.x; - retRec.y = rec2.y; - retRec.width = rec2.width - dxx; - retRec.height = rec1.height - dyy; + rec.x = rec1.x; + rec.y = rec2.y; + rec.width = rec2.width - dxx; + rec.height = rec1.height - dyy; } else { - retRec.x = rec1.x; - retRec.y = rec1.y; - retRec.width = rec2.width - dxx; - retRec.height = rec2.height - dyy; + rec.x = rec1.x; + rec.y = rec1.y; + rec.width = rec2.width - dxx; + rec.height = rec2.height - dyy; } } if (rec1.width > rec2.width) { - if (retRec.width >= rec2.width) retRec.width = rec2.width; + if (rec.width >= rec2.width) rec.width = rec2.width; } else { - if (retRec.width >= rec1.width) retRec.width = rec1.width; + if (rec.width >= rec1.width) rec.width = rec1.width; } if (rec1.height > rec2.height) { - if (retRec.height >= rec2.height) retRec.height = rec2.height; + if (rec.height >= rec2.height) rec.height = rec2.height; } else { - if (retRec.height >= rec1.height) retRec.height = rec1.height; + if (rec.height >= rec1.height) rec.height = rec1.height; } } - return retRec; + return rec; } //---------------------------------------------------------------------------------- |
