diff options
author | wwylele <wwylele@gmail.com> | 2016-12-11 23:27:30 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2016-12-26 10:41:26 +0200 |
commit | 55f5d0f7770ea625e283aa7878340fc80a70cfd7 (patch) | |
tree | 6aedc66fcaa4760817b5621e905a40ae0a8c5d54 /src/common/math_util.h | |
parent | 2a069e76a5093db44a87732edb72a1bb2b771e61 (diff) |
MathUtil: add PI constant
Diffstat (limited to 'src/common/math_util.h')
-rw-r--r-- | src/common/math_util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h index cdeaeb7333..45a1ed3670 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)); |