Tracore
Static Public Member Functions | List of all members
util::MyMath Class Reference

#include <MyMath.h>

Static Public Member Functions

static double Clamp (double min, double max, double value)
 
static double Lerp (double a, double b, double value)
 
static double InverseLerp (double a, double b, double value)
 
static double EuclideanDistance (cv::Point3d a, cv::Point3d b)
 

Detailed Description

Utility class for mathematical operations.

Member Function Documentation

double util::MyMath::Clamp ( double  min,
double  max,
double  value 
)
static

Clamps the value between min and max, both inclusive.

Parameters
minThe minimum value
maxThe maximum value
valueThe value to clamp
Returns
The clamped value
double util::MyMath::EuclideanDistance ( cv::Point3d  a,
cv::Point3d  b 
)
static

Calculates the euclidean distance of the given points.

Parameters
aThe first point in 3D space
bThe second point in 3D space
Returns
The euclidean distance
double util::MyMath::InverseLerp ( double  a,
double  b,
double  value 
)
static

Inverse linearly interpolates between a and b at value.

Parameters
aThe first value
bThe second value
valueThe value to get the interpolation of
Returns
The interpolation value
double util::MyMath::Lerp ( double  a,
double  b,
double  value 
)
static

Linearly interpolates between a and b at value.

Parameters
aThe first value
bThe second value
valueThe interpolation value
Returns
The interpolated value

The documentation for this class was generated from the following files: