From 79e393cf4b5027eb9071df23f4834aac3f3a689f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 16 Sep 2018 19:59:42 +0300 Subject: Light curve: Simplify and improve code, fix darkened daytime sky (#7693) --- src/util/numeric.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util/numeric.h') diff --git a/src/util/numeric.h b/src/util/numeric.h index 61370a3f4..b1e2845b8 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -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 */ -- cgit v1.2.3