mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-14 23:38:15 +00:00
Code gardening
- Review formatting - Improve readability for some functions result return - Minimize early returns - Align LoadFileData() to UnloadFileData()
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user