mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Weather support
This commit is contained in:
@@ -349,5 +349,12 @@ inline void paging(u32 length, u32 page, u32 pagecount, u32 &minindex, u32 &maxi
|
||||
}
|
||||
}
|
||||
|
||||
inline float cycle_shift(float value, float by = 0, float max = 1)
|
||||
{
|
||||
if (value + by < 0) return max + by + value;
|
||||
if (value + by > max) return value + by - max;
|
||||
return value + by;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user