Code gardening

- Review formatting
 - Improve readability for some functions result return
 - Minimize early returns
 - Align LoadFileData() to UnloadFileData()
This commit is contained in:
Ray
2024-04-20 13:53:13 +02:00
parent 2754c80596
commit 29ce13b777
6 changed files with 160 additions and 80 deletions

View File

@@ -2345,11 +2345,16 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
// NOTE: Used by DrawLineBezier() only
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;
t -= 2;
return 0.5f*c*(t*t*t + 2.0f) + b;
float result = 0.0f;
if ((t /= 0.5f*d) < 1) result = 0.5f*c*t*t*t + b;
else
{
t -= 2;
result = 0.5f*c*(t*t*t + 2.0f) + b;
}
return result;
}
#endif // SUPPORT_MODULE_RSHAPES