summaryrefslogtreecommitdiffhomepage
path: root/src/shapes.c
diff options
context:
space:
mode:
authorRay <[email protected]>2019-06-16 23:37:16 +0200
committerRay <[email protected]>2019-06-16 23:37:16 +0200
commite36a80f73023514931ec3354f7427db7245553a6 (patch)
tree57e4b0b10cab0edd5a7bcc3d5d7d589e96033233 /src/shapes.c
parentd21422687aab99df97803e34d5f37f38b7684e00 (diff)
downloadraylib-e36a80f73023514931ec3354f7427db7245553a6.tar.gz
raylib-e36a80f73023514931ec3354f7427db7245553a6.zip
Code tweaks
Diffstat (limited to 'src/shapes.c')
-rw-r--r--src/shapes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shapes.c b/src/shapes.c
index 64beb8ca..bab8a5a4 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -1474,9 +1474,10 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
// NOTE: Required for DrawLineBezier()
static float EaseCubicInOut(float t, float b, float c, float d)
{
- if ((t /= 0.5f*d) < 1)
- return 0.5f*c*t*t*t + b;
+ if ((t /= 0.5f*d) < 1) return 0.5f*c*t*t*t + b;
+
t -= 2;
+
return 0.5f*c*(t*t*t + 2.0f) + b;
}