39 return value >= 0 ? 1 : -1;
60 static Eigen::Vector3f
62 const Eigen::Vector3f&
max,
63 const Eigen::Vector3f& value)
71 LimitTo(
double value,
double absThreshold)
73 return LimitMinMax(-absThreshold, absThreshold, value);
78 static Eigen::Vector3f
79 LimitTo(
const Eigen::Vector3f& val,
float maxNorm)
81 float norm = val.norm();
84 return val /
norm * maxNorm;
92 return value >=
min && value <=
max;
98 return value >=
min && value <=
max;
104 return value >=
min && value <=
max;
109 const Eigen::Vector3f&
max,
110 const Eigen::Vector3f& value)
116 static std::vector<float>
119 std::vector<float> result;
121 for (
size_t i = 0; i < v1.size() && i < v2.size(); i++)
123 result.push_back(v1.at(i) - v2.at(i));
129 static std::vector<float>
132 std::vector<float> result;
134 for (
size_t i = 0; i < v1.size() && i < v2.size(); i++)
136 result.push_back(std::fabs(v1.at(i) - v2.at(i)));
145 float max = vec.at(0);
147 for (
size_t i = 1; i < vec.size(); i++)
149 max = std::max(
max, vec.at(i));
156 fmod(
float value,
float boundLow,
float boundHigh)
158 value = std::fmod(value - boundLow, boundHigh - boundLow) + boundLow;
159 if (value < boundLow)
161 value += boundHigh - boundLow;
185 Lerp(
float a,
float b,
float f)
187 return a * (1 - f) + b * f;
199 return (f - a) / (b - a);
212 return Lerp(a, b, f);
static int Sign(double value)
static float VectorMax(const std::vector< float > &vec)
static double LimitMinMax(double min, double max, double value)
static float angleModPI(float value)
static bool CheckMinMax(double min, double max, double value)
static float angleMod2PI(float value)
static float Lerp(float a, float b, float f)
static Eigen::Vector3f LimitMinMax(const Eigen::Vector3f &min, const Eigen::Vector3f &max, const Eigen::Vector3f &value)
static std::vector< float > VectorAbsDiff(const std::vector< float > &v1, const std::vector< float > &v2)
static bool CheckMinMax(const Eigen::Vector3f &min, const Eigen::Vector3f &max, const Eigen::Vector3f &value)
static float LimitMinMax(float min, float max, float value)
static bool CheckMinMax(float min, float max, float value)
static float LerpClamp(float a, float b, float f)
static float fmod(float value, float boundLow, float boundHigh)
static float ILerp(float a, float b, float f)
static double LimitTo(double value, double absThreshold)
static float AngleLerp(float a, float b, float f)
static int LimitMinMax(int min, int max, int value)
static Eigen::Vector3f LimitTo(const Eigen::Vector3f &val, float maxNorm)
static std::vector< float > VectorSubtract(const std::vector< float > &v1, const std::vector< float > &v2)
static float angleModX(float value, float center)
static float ILerpClamp(float a, float b, float f)
static bool CheckMinMax(int min, int max, int value)
static float AngleDelta(float angle1, float angle2)
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
double norm(const Point &a)