summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2017-10-13 14:03:15 +0200
committerGitHub <[email protected]>2017-10-13 14:03:15 +0200
commitc043226b562b465e33de377393279bad870cdd84 (patch)
treed59364cd7946ce5992cf2b9217b0a5e66770d865 /src
parent8928248c71ad12854e69060a8f2a9d0e615053f3 (diff)
parent107294f3e64c0b1c5722f736097adb808aa3a83c (diff)
downloadraylib-c043226b562b465e33de377393279bad870cdd84.tar.gz
raylib-c043226b562b465e33de377393279bad870cdd84.zip
Merge pull request #366 from a3f/develop
Fix warning about unsequenced modification of variable
Diffstat (limited to 'src')
-rw-r--r--src/shapes.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shapes.c b/src/shapes.c
index 8197735f..0b34f921 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -682,6 +682,8 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
// NOTE: Required for DrawLineBezier()
static float EaseCubicInOut(float t, float b, float c, float d)
{
- if ((t/=d/2) < 1) return (c/2*t*t*t + b);
- return (c/2*((t-=2)*t*t + 2) + b);
-} \ No newline at end of file
+ if ((t /= 0.5*d) < 1)
+ return 0.5*c*t*t*t + b;
+ t -= 2;
+ return 0.5*c*(t*t*t + 2) + b;
+}