mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
Simplified time of day logic (#1487)
Slight optimizations by checking only the upper boundary as we check the lower boundary with the previous if statement(s).
This commit is contained in:
parent
e44500dcf2
commit
3b2f9191ab
|
@ -70,9 +70,9 @@ const char* time_of_day_str(float time) {
|
|||
|
||||
if (hour >= 0 && hour <= 9)
|
||||
return "green-sun";
|
||||
else if (hour >= 10 && hour <= 21)
|
||||
else if (hour < 22)
|
||||
return "day";
|
||||
else if (hour >= 22 && hour <= 24)
|
||||
else if (hour < 25)
|
||||
return "evening";
|
||||
else
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue