38 return (value > 0.0) ? std::floor(value + 0.5) : std::ceil(value - 0.5);
48 return Round(value / multiple) * multiple;
58 return std::ceil(value / multiple) * multiple;
61 bool IsNear(
double v1,
double v2,
double epsilon)
63 return std::fabs(v1 - v2) <= epsilon;
67 double variable_angle,
70 if (std::abs(static_angle - variable_angle) > threshold)
72 if (variable_angle < static_angle)
81 return variable_angle;
double UpToNearest(double value, double multiple)
double unWrapAngle(double static_angle, double variable_angle, double threshold=_pi)
double ToNearest(double value, double multiple)
bool IsNear(double v1, double v2, double epsilon)
double Round(double value)
static const long double _2pi