Static Public Member Functions | Static Public Attributes | List of all members
MathSup Class Reference

#include <MathSup.h>

Static Public Member Functions

static double atan4quad (double y, double x)
 
static double calcDeltaAng (const double &a, const double &b)
 
static double convDegToRad (const double &dAngDeg)
 
static double convFloatToInt4Byte (double dVal)
 
static double convInt4ByteToFloat (int iVal)
 
static double convRadToDeg (const double &dAngRad)
 
static double distance (double x1, double y1, double x2, double y2)
 
static double distanceSq (double x1, double y1, double x2, double y2)
 
static double getMax (const double &a, const double &b)
 
static double getMin (const double &a, const double &b)
 
static bool isBitSet (int iVal, int iNrBit)
 
static bool isInInterval (double dLow, double dHigh, double dVal)
 
static int limit (double *pdToLimit, double dLimit)
 
static int limit (int *piToLimit, int iLimit)
 
static void normalize2Pi (double &angle)
 
static void normalizePi (double &angle)
 
static void normalizePiHalf (double &angle)
 
static double sign (const double &x)
 

Static Public Attributes

static const double HALF_PI = 1.5707963267948966192313216916398
 Constant for PI/2. More...
 
static const double PI = 3.14159265358979323846
 Constant for PI. More...
 
static const double TWO_PI = 6.283185307179586476925286766559
 Constant for 2*PI. More...
 

Detailed Description

Provides diverse mathematical utilities and functions.

Definition at line 29 of file MathSup.h.

Member Function Documentation

static double MathSup::atan4quad ( double  y,
double  x 
)
inlinestatic

Calculates the arcus tangens and removes ambiguity in quadrant.

Definition at line 135 of file MathSup.h.

static double MathSup::calcDeltaAng ( const double &  a,
const double &  b 
)
inlinestatic

Calculates the difference angle a-b. The difference ange is normalized to the interval ]-pi,pi].

Definition at line 124 of file MathSup.h.

static double MathSup::convDegToRad ( const double &  dAngDeg)
inlinestatic

Converts degree to radian.

Definition at line 54 of file MathSup.h.

static double MathSup::convFloatToInt4Byte ( double  dVal)
inlinestatic

Converts a float to a 4 byte integer value according to IEEE specification.

Definition at line 199 of file MathSup.h.

static double MathSup::convInt4ByteToFloat ( int  iVal)
inlinestatic

Converts a 4 byte integer value to float according to IEEE specification.

Definition at line 209 of file MathSup.h.

static double MathSup::convRadToDeg ( const double &  dAngRad)
inlinestatic

Converts radian to degree.

Definition at line 46 of file MathSup.h.

static double MathSup::distance ( double  x1,
double  y1,
double  x2,
double  y2 
)
inlinestatic

Calculates the euclidean distance of two points.

Definition at line 168 of file MathSup.h.

static double MathSup::distanceSq ( double  x1,
double  y1,
double  x2,
double  y2 
)
inlinestatic

Calculates the squared euclidean distance of two points.

Definition at line 176 of file MathSup.h.

static double MathSup::getMax ( const double &  a,
const double &  b 
)
inlinestatic

Returns the maximum.

Definition at line 112 of file MathSup.h.

static double MathSup::getMin ( const double &  a,
const double &  b 
)
inlinestatic

Returns the minimum.

Definition at line 101 of file MathSup.h.

static bool MathSup::isBitSet ( int  iVal,
int  iNrBit 
)
inlinestatic

Checks if a bit is set.

Definition at line 187 of file MathSup.h.

static bool MathSup::isInInterval ( double  dLow,
double  dHigh,
double  dVal 
)
inlinestatic

Checks value to be in an interval [dLow, dHigh].

Parameters
dLowlower bound
dHighupper bound
dValvalue
Returns
true if value is in the interval

Definition at line 294 of file MathSup.h.

static int MathSup::limit ( double *  pdToLimit,
double  dLimit 
)
inlinestatic

Limits a variable to the interval [-dLimit, dLimit].

Parameters
pdToLimitvariable to be limited
dLimitbound of the interval [-dLimit, dLimit]
Returns
0: value is in the interval, 1: value has been bound to the lower bound, 2: value has been bound to the upper bound

Definition at line 244 of file MathSup.h.

static int MathSup::limit ( int *  piToLimit,
int  iLimit 
)
inlinestatic

Limits a variable to the interval [-dLimit, dLimit].

Parameters
piToLimitvariable to be limited
iLimitbound of the interval [-dLimit, dLimit]
Returns
0: value is in interval, 1: value has been bound to the lower bound, 2: value has been bound to the upper bound

Definition at line 269 of file MathSup.h.

static void MathSup::normalize2Pi ( double &  angle)
inlinestatic

Normalizes angle to the interval [0,2pi[.

Definition at line 62 of file MathSup.h.

static void MathSup::normalizePi ( double &  angle)
inlinestatic

Normalizes angle to the interval ]-pi,pi].

Definition at line 70 of file MathSup.h.

static void MathSup::normalizePiHalf ( double &  angle)
inlinestatic

Normalizes angle to the interval ]-pi/2,pi/2] for lines or segments.

Definition at line 79 of file MathSup.h.

static double MathSup::sign ( const double &  x)
inlinestatic

Returns the sign.

Definition at line 90 of file MathSup.h.

Member Data Documentation

const double MathSup::HALF_PI = 1.5707963267948966192313216916398
static

Constant for PI/2.

Definition at line 40 of file MathSup.h.

const double MathSup::PI = 3.14159265358979323846
static

Constant for PI.

Definition at line 34 of file MathSup.h.

const double MathSup::TWO_PI = 6.283185307179586476925286766559
static

Constant for 2*PI.

Definition at line 37 of file MathSup.h.


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


cob_utilities
Author(s): Christian Connette
autogenerated on Wed Apr 7 2021 02:11:52