Parcourir la source

MathUtil: add PI constant

wwylele il y a 9 ans
Parent
commit
55f5d0f777
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/common/math_util.h

+ 2 - 0
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));