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 | 078d188544e41c71c116dd0f3bf12a977b72f4a6 (patch) | |
| tree | 6aedc66fcaa4760817b5621e905a40ae0a8c5d54 /src/common/math_util.h | |
| parent | 9d5a7fd3f799b3ccc50fdc312f13b94dedfcf86b (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)); |
