aboutsummaryrefslogtreecommitdiff
path: root/src/util/numeric.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/numeric.h')
-rw-r--r--src/util/numeric.h5
1 files changed, 5 insertions, 0 deletions
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
*/