mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Weather support
This commit is contained in:
parent
e65d8ad655
commit
3aedfac968
23 changed files with 552 additions and 91 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue