ADTF
stdmath.h
Go to the documentation of this file.
1 
8 #ifndef _STDMATH_H_
9 #define _STDMATH_H_
10 
11 namespace A_UTILS_NS
12 {
13 
19 class DOEXPORT cStdMath
20 {
21  public:
22  static const tFloat64 MATH_E;
23  static const tFloat64 MATH_LOG2E;
24  static const tFloat64 MATH_LOG10E;
25  static const tFloat64 MATH_LN2;
26  static const tFloat64 MATH_LN10;
27  static const tFloat64 MATH_PI;
28  static const tFloat64 MATH_PI_2;
29  static const tFloat64 MATH_PI_4;
30  static const tFloat64 MATH_1_PI;
31  static const tFloat64 MATH_2_PI;
32  static const tFloat64 MATH_2_SQRTPI;
33  static const tFloat64 MATH_SQRT2;
34  static const tFloat64 MATH_SQRT1_2;
35  static const tFloat64 MATH_DEG2RAD;
36  static const tFloat64 MATH_RAD2DEG;
37 
38  public:
39 
49  static tInt32 GetProgressValue(tInt32 nValue, tInt32 nTotal);
50 
62  static tResult UnitConversion(tFloat64* pf64Value,
63  const cString& strSourceUnit,
64  const cString& strDestinationUnit = cString::Empty);
65 
79  static tBool CompareFloat(tFloat64 f64Value1, tFloat64 f64Value2, tFloat64 f64RelativeError=0.000000000000001);
80 };
81 
82 } // namespace A_UTILS_NS
83 
84 #endif
int32_t tInt32
type definition for signed integer values (32bit) (platform and compiler independent type).
double tFloat64
type definition for Float64 (64bit double values) (platform and compiler independent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
Class for standard math operations.
Definition: stdmath.h:20
static const tFloat64 MATH_1_PI
1 / pi
Definition: stdmath.h:30
static const tFloat64 MATH_2_SQRTPI
two divided by square root of pi
Definition: stdmath.h:32
static const tFloat64 MATH_PI_2
pi / 2
Definition: stdmath.h:28
static const tFloat64 MATH_LN10
natural logarithm of ten
Definition: stdmath.h:26
static const tFloat64 MATH_LOG10E
logarithm to the basis 10 of Euler's number
Definition: stdmath.h:24
static const tFloat64 MATH_2_PI
2 / pi
Definition: stdmath.h:31
static const tFloat64 MATH_SQRT2
square root of two
Definition: stdmath.h:33
static const tFloat64 MATH_PI_4
pi / 4
Definition: stdmath.h:29
static const tFloat64 MATH_E
Euler's number.
Definition: stdmath.h:22
static const tFloat64 MATH_DEG2RAD
constant to convert from degree to radiant
Definition: stdmath.h:35
static tInt32 GetProgressValue(tInt32 nValue, tInt32 nTotal)
static const tFloat64 MATH_LOG2E
logarithm to the basis 2 of Euler's number
Definition: stdmath.h:23
static tResult UnitConversion(tFloat64 *pf64Value, const cString &strSourceUnit, const cString &strDestinationUnit=cString::Empty)
Unit Conversion.
static const tFloat64 MATH_RAD2DEG
constant to convert from radiant to degree
Definition: stdmath.h:36
static const tFloat64 MATH_LN2
natural logarithm of two
Definition: stdmath.h:25
static tBool CompareFloat(tFloat64 f64Value1, tFloat64 f64Value2, tFloat64 f64RelativeError=0.000000000000001)
Compare of Float value with relative error.
static const tFloat64 MATH_SQRT1_2
square root of 1/2
Definition: stdmath.h:34
static const tFloat64 MATH_PI
pi
Definition: stdmath.h:27
static const _myType Empty
Internally used empty string.
Definition: string.h:54
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Definition: d_ptr.h:11