mirror of
https://github.com/open-goal/jak-project
synced 2026-06-03 18:36:52 -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:
+2
-2
@@ -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 "";
|
||||
|
||||
Reference in New Issue
Block a user