From 55f5d0f7770ea625e283aa7878340fc80a70cfd7 Mon Sep 17 00:00:00 2001 From: wwylele Date: Sun, 11 Dec 2016 23:27:30 +0200 Subject: MathUtil: add PI constant --- src/common/math_util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common/math_util.h') diff --git a/src/common/math_util.h b/src/common/math_util.h index cdeaeb733..45a1ed367 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -10,6 +10,8 @@ namespace MathUtil { +static constexpr float PI = 3.14159265f; + inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start1, unsigned length1) { return (std::max(start0, start1) < std::min(start0 + length0, start1 + length1)); -- cgit v1.2.3