7constexpr double kPi = 3.1415926535897932384626433832795;
8constexpr double kPiHalf = 1.5707963267948966192313216916398;
9constexpr double kPiDouble = 6.283185307179586476925286766559;
10constexpr double kInvPiDouble = 0.15915494309189533576888376337251;
11constexpr double kPiDividedBySqrt2 = 2.2214414690791831235079404950303;
12constexpr double kPiSquare = 9.8696044010893586188344909998762;
14constexpr double kRad2Deg = 57.295779513082320876798154814105;
15constexpr double kDeg2Rad = 0.01745329251994329576923690768489;
17static const Eigen::Matrix<double, 1, 4> kAffineConstant = {0, 0, 0, 1};
19static const double kDoubleEpsilon = std::numeric_limits<double>::epsilon();
22inline void fsincos(
double theta,
29 theta -= (int)(theta * kInvPiDouble) * kPiDouble;
34 if (theta < kPiHalf) {
35 cosine = sqrt(1 - sine * sine);
37 }
else if (theta < kPi + kPiHalf) {
38 cosine = -sqrt(1 - sine * sine);
41 cosine = sqrt(1 - sine * sine);