1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Light curve: Simplify and improve code, fix darkened daytime sky (#7693)

This commit is contained in:
Vitaliy 2018-09-16 19:59:42 +03:00 committed by Paramat
parent 220ec79e4a
commit 79e393cf4b
3 changed files with 46 additions and 30 deletions

View file

@ -243,6 +243,11 @@ inline s32 myround(f32 f)
return (s32)(f < 0.f ? (f - 0.5f) : (f + 0.5f));
}
inline constexpr f32 sqr(f32 f)
{
return f * f;
}
/*
Returns integer position of node in given floating point position
*/