MathSup Class Reference

#include <MathSup.h>

List of all members.

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 (int *piToLimit, int iLimit)
static int limit (double *pdToLimit, double dLimit)
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.
static const double PI = 3.14159265358979323846
 Constant for PI.
static const double TWO_PI = 6.283185307179586476925286766559
 Constant for 2*PI.

Detailed Description

Provides diverse mathematical utilities and functions.

Definition at line 65 of file MathSup.h.


Member Function Documentation

static double MathSup::atan4quad ( double  y,
double  x 
) [inline, static]

Calculates the arcus tangens and removes ambiguity in quadrant.

Definition at line 171 of file MathSup.h.

static double MathSup::calcDeltaAng ( const double &  a,
const double &  b 
) [inline, static]

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

Definition at line 160 of file MathSup.h.

static double MathSup::convDegToRad ( const double &  dAngDeg  )  [inline, static]

Converts degree to radian.

Definition at line 90 of file MathSup.h.

static double MathSup::convFloatToInt4Byte ( double  dVal  )  [inline, static]

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

Definition at line 235 of file MathSup.h.

static double MathSup::convInt4ByteToFloat ( int  iVal  )  [inline, static]

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

Definition at line 245 of file MathSup.h.

static double MathSup::convRadToDeg ( const double &  dAngRad  )  [inline, static]

Converts radian to degree.

Definition at line 82 of file MathSup.h.

static double MathSup::distance ( double  x1,
double  y1,
double  x2,
double  y2 
) [inline, static]

Calculates the euclidean distance of two points.

Definition at line 204 of file MathSup.h.

static double MathSup::distanceSq ( double  x1,
double  y1,
double  x2,
double  y2 
) [inline, static]

Calculates the squared euclidean distance of two points.

Definition at line 212 of file MathSup.h.

static double MathSup::getMax ( const double &  a,
const double &  b 
) [inline, static]

Returns the maximum.

Definition at line 148 of file MathSup.h.

static double MathSup::getMin ( const double &  a,
const double &  b 
) [inline, static]

Returns the minimum.

Definition at line 137 of file MathSup.h.

static bool MathSup::isBitSet ( int  iVal,
int  iNrBit 
) [inline, static]

Checks if a bit is set.

Definition at line 223 of file MathSup.h.

static bool MathSup::isInInterval ( double  dLow,
double  dHigh,
double  dVal 
) [inline, static]

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

Parameters:
dLow lower bound
dHigh upper bound
dVal value
Returns:
true if value is in the interval

Definition at line 330 of file MathSup.h.

static int MathSup::limit ( int *  piToLimit,
int  iLimit 
) [inline, static]

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

Parameters:
piToLimit variable to be limited
iLimit bound 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 305 of file MathSup.h.

static int MathSup::limit ( double *  pdToLimit,
double  dLimit 
) [inline, static]

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

Parameters:
pdToLimit variable to be limited
dLimit bound 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 280 of file MathSup.h.

static void MathSup::normalize2Pi ( double &  angle  )  [inline, static]

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

Definition at line 98 of file MathSup.h.

static void MathSup::normalizePi ( double &  angle  )  [inline, static]

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

Definition at line 106 of file MathSup.h.

static void MathSup::normalizePiHalf ( double &  angle  )  [inline, static]

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

Definition at line 115 of file MathSup.h.

static double MathSup::sign ( const double &  x  )  [inline, static]

Returns the sign.

Definition at line 126 of file MathSup.h.


Member Data Documentation

const double MathSup::HALF_PI = 1.5707963267948966192313216916398 [static]

Constant for PI/2.

Definition at line 76 of file MathSup.h.

const double MathSup::PI = 3.14159265358979323846 [static]

Constant for PI.

Definition at line 70 of file MathSup.h.

const double MathSup::TWO_PI = 6.283185307179586476925286766559 [static]

Constant for 2*PI.

Definition at line 73 of file MathSup.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerator Defines


cob_utilities
Author(s): Christian Connette
autogenerated on Fri Jan 11 10:01:02 2013