ADTF
|
Class for standard math operations. More...
Static Public Member Functions | |
static tInt32 | GetProgressValue (tInt32 nValue, tInt32 nTotal) |
static tResult | UnitConversion (tFloat64 *pf64Value, const cString &strSourceUnit, const cString &strDestinationUnit=cString::Empty) |
Unit Conversion. More... | |
static tBool | CompareFloat (tFloat64 f64Value1, tFloat64 f64Value2, tFloat64 f64RelativeError=0.000000000000001) |
Compare of Float value with relative error. More... | |
Static Public Attributes | |
static const tFloat64 | MATH_E |
Euler's number. | |
static const tFloat64 | MATH_LOG2E |
logarithm to the basis 2 of Euler's number | |
static const tFloat64 | MATH_LOG10E |
logarithm to the basis 10 of Euler's number | |
static const tFloat64 | MATH_LN2 |
natural logarithm of two | |
static const tFloat64 | MATH_LN10 |
natural logarithm of ten | |
static const tFloat64 | MATH_PI |
pi | |
static const tFloat64 | MATH_PI_2 |
pi / 2 | |
static const tFloat64 | MATH_PI_4 |
pi / 4 | |
static const tFloat64 | MATH_1_PI |
1 / pi | |
static const tFloat64 | MATH_2_PI |
2 / pi | |
static const tFloat64 | MATH_2_SQRTPI |
two divided by square root of pi | |
static const tFloat64 | MATH_SQRT2 |
square root of two | |
static const tFloat64 | MATH_SQRT1_2 |
square root of 1/2 | |
static const tFloat64 | MATH_DEG2RAD |
constant to convert from degree to radiant | |
static const tFloat64 | MATH_RAD2DEG |
constant to convert from radiant to degree | |
|
static |
Compare of Float value with relative error.
f64Value1 | [in] first float value to compare |
f64Value2 | [in] second float value to compare |
f64RelativeError | [in] relative error in percent between 0..1 for comparisons |
tTrue | float values are equal (within relative error range) |
tFalse | float values are not equal (within relative error range) |
nValue | [in] Current integer value |
nTotal | [in] Maximum integer value that represents 100 percent. |
|
static |
Unit Conversion.
This method converts a float value with a special unit into an other.
pf64Value | [inout] float value to convert |
strSourceUnit | [in] source unit of float value |
strDestinationUnit | [in] unit to convert float value to |