Go to the documentation of this file.
36 return value >= 0 ? 1 : -1;
51 static Eigen::Vector3f
LimitMinMax(
const Eigen::Vector3f&
min,
const Eigen::Vector3f&
max,
const Eigen::Vector3f&
value)
63 static Eigen::Vector3f
LimitTo(
const Eigen::Vector3f& val,
float maxNorm)
65 float norm = val.norm();
68 return val /
norm * maxNorm;
90 static std::vector<float>
VectorSubtract(
const std::vector<float>& v1,
const std::vector<float>& v2)
92 std::vector<float> result;
94 for (
size_t i = 0; i < v1.size() && i < v2.size(); i++)
96 result.push_back(v1.at(i) - v2.at(i));
101 static std::vector<float>
VectorAbsDiff(
const std::vector<float>& v1,
const std::vector<float>& v2)
103 std::vector<float> result;
105 for (
size_t i = 0; i < v1.size() && i < v2.size(); i++)
107 result.push_back(std::fabs(v1.at(i) - v2.at(i)));
115 float max = vec.at(0);
117 for (
size_t i = 1; i < vec.size(); i++)
125 static float fmod(
float value,
float boundLow,
float boundHigh)
127 value = std::fmod(
value - boundLow, boundHigh - boundLow) + boundLow;
128 if (
value < boundLow)
130 value += boundHigh - boundLow;
150 static float Lerp(
float a,
float b,
float f)
152 return a * (1 - f) + b * f;
160 static float ILerp(
float a,
float b,
float f)
162 return (f -
a) / (b -
a);
173 return Lerp(
a, b, f);
static Eigen::Vector3f LimitTo(const Eigen::Vector3f &val, float maxNorm)
static float ILerp(float a, float b, float f)
static float VectorMax(const std::vector< float > &vec)
static float AngleLerp(float a, float b, float f)
static float AngleDelta(float angle1, float angle2)
static std::vector< float > VectorSubtract(const std::vector< float > &v1, const std::vector< float > &v2)
static double LimitMinMax(double min, double max, double value)
static float fmod(float value, float boundLow, float boundHigh)
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
static float angleModX(float value, float center)
static bool CheckMinMax(const Eigen::Vector3f &min, const Eigen::Vector3f &max, const Eigen::Vector3f &value)
static float angleMod2PI(float value)
double a(double t, double a0, double j)
std::shared_ptr< Value > value()
static Eigen::Vector3f LimitMinMax(const Eigen::Vector3f &min, const Eigen::Vector3f &max, const Eigen::Vector3f &value)
static bool CheckMinMax(double min, double max, double value)
static float angleModPI(float value)
static float LimitMinMax(float min, float max, float value)
static double LimitTo(double value, double absThreshold)
static int LimitMinMax(int min, int max, int value)
static float LerpClamp(float a, float b, float f)
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
static int Sign(double value)
static std::vector< float > VectorAbsDiff(const std::vector< float > &v1, const std::vector< float > &v2)
static float ILerpClamp(float a, float b, float f)
static bool CheckMinMax(int min, int max, int value)
static bool CheckMinMax(float min, float max, float value)
static float Lerp(float a, float b, float f)
double norm(const Point &a)