Generic math and statistics functions. More...
#include <Math.h>
Classes | |
struct | WeightedValue |
Static Public Member Functions | |
static double | angleToPercent (double newAngle, double oldAngle) |
static float | angleVariance (float meanAngle, const std::vector< float > &angles) |
static Point2D | center (std::vector< Point2D > &points) |
static float | deg2Rad (float deg) |
static double | horizontalViewAngle (double diagonalAngle, double aspectRatio) |
template<class ValueT > | |
static ValueT | max (ValueT a, ValueT b) |
template<class ContainerT > | |
static double | mean (const ContainerT &values) |
static float | meanAngle (const std::vector< float > &angles) |
static float | meanAngleWeighted (const std::vector< WeightedValue > &weightedAngles) |
template<class ValueT > | |
static ValueT | min (ValueT a, ValueT b) |
static float | minTurnAngle (float angle1, float angle2) |
static double | percentToAngle (double percent, double angle) |
static float | rad2Deg (float rad) |
static double | random01 (unsigned long init=0) |
static double | randomGauss (float variance=1.0) |
template<class ContainerT > | |
static double | variance (const ContainerT &values) |
static double | verticalViewAngle (double diagonalAngle, double aspectRatio) |
Static Public Attributes | |
static const double | Pi = 3.14159265358979323846 |
Private Member Functions | |
Math () | |
The constructor. | |
~Math () | |
The destructor. |
Math::Math | ( | ) | [private] |
The constructor.
Math::~Math | ( | ) | [private] |
The destructor.
static double Math::angleToPercent | ( | double | newAngle, |
double | oldAngle | ||
) | [inline, static] |
static float Math::angleVariance | ( | float | meanAngle, |
const std::vector< float > & | angles | ||
) | [static] |
static Point2D Math::center | ( | std::vector< Point2D > & | points | ) | [static] |
static float Math::deg2Rad | ( | float | deg | ) | [inline, static] |
static double Math::horizontalViewAngle | ( | double | diagonalAngle, |
double | aspectRatio | ||
) | [inline, static] |
static ValueT Math::max | ( | ValueT | a, |
ValueT | b | ||
) | [inline, static] |
double Math::mean | ( | const ContainerT & | values | ) | [static] |
static float Math::meanAngle | ( | const std::vector< float > & | angles | ) | [static] |
static float Math::meanAngleWeighted | ( | const std::vector< WeightedValue > & | weightedAngles | ) | [static] |
static ValueT Math::min | ( | ValueT | a, |
ValueT | b | ||
) | [inline, static] |
static float Math::minTurnAngle | ( | float | angle1, |
float | angle2 | ||
) | [static] |
static double Math::percentToAngle | ( | double | percent, |
double | angle | ||
) | [inline, static] |
static float Math::rad2Deg | ( | float | rad | ) | [inline, static] |
static double Math::random01 | ( | unsigned long | init = 0 | ) | [static] |
static double Math::randomGauss | ( | float | variance = 1.0 | ) | [static] |
double Math::variance | ( | const ContainerT & | values | ) | [static] |
static double Math::verticalViewAngle | ( | double | diagonalAngle, |
double | aspectRatio | ||
) | [inline, static] |