Go to the documentation of this file.
18 #ifndef karto_sdk_MATH_H
19 #define karto_sdk_MATH_H
79 return (value * value);
89 return value >= 0.0 ? floor(value + 0.5) : ceil(value - 0.5);
99 inline const T&
Minimum(
const T& value1,
const T& value2)
101 return value1 < value2 ? value1 : value2;
111 inline const T&
Maximum(
const T& value1,
const T& value2)
113 return value1 > value2 ? value1 : value2;
124 inline const T&
Clip(
const T& n,
const T& minValue,
const T& maxValue)
137 double delta = a - b;
149 return (value >= 0 && value < maximum);
161 return (value < maximum);
174 return (value >= a && value <= b);
223 while (minuend - subtrahend < -
KT_PI)
228 while (minuend - subtrahend >
KT_PI)
246 return static_cast<T
> ((value + (alignValue - 1)) & ~(alignValue - 1));
252 #endif // karto_sdk_MATH_H
kt_double Round(kt_double value)
const kt_double KT_180_PI
const kt_double KT_TOLERANCE
const T & Minimum(const T &value1, const T &value2)
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
kt_double DegreesToRadians(kt_double degrees)
const kt_double KT_PI_180
const T & Maximum(const T &value1, const T &value2)
kt_bool IsUpTo< kt_int32u >(const kt_int32u &value, const kt_int32u &maximum)
T AlignValue(size_t value, size_t alignValue=8)
const T & Clip(const T &n, const T &minValue, const T &maxValue)
kt_double RadiansToDegrees(kt_double radians)
kt_double NormalizeAngle(kt_double angle)
kt_bool InRange(const T &value, const T &a, const T &b)
kt_bool DoubleEqual(kt_double a, kt_double b)
kt_double NormalizeAngleDifference(kt_double minuend, kt_double subtrahend)
kt_bool IsUpTo(const T &value, const T &maximum)
const kt_int32s INVALID_SCAN
slam_toolbox
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:37:55