#include <qgarlib/math.H>
The class is just a collection of constants and therefore cannot be instanciated.
All mathematical constants have been computed using Maple.
Definition at line 84 of file math.H.
Static Public Member Functions | |
Access to thresholds for numeric calculus | |
| static double | relError () |
| Get relative error for floating point numeric calculus. | |
Access to thresholds for (in)equality tests | |
| static double | epsilonD () |
| Get threshold for equality tests between double numbers. | |
| static float | epsilonF () |
| Get threshold for equality tests between float numbers. | |
| static int | epsilonI () |
| Get threshold for equality tests between int numbers. | |
| static double | epsilonRadian () |
| Get threshold for equality tests between angles in radians. | |
| static double | epsilonDegree () |
| Get threshold for equality tests between angles in degrees. | |
Set thresholds for numeric calculus | |
| static void | setRelError (double aRelError) |
| Set relative error for floating point numeric calculus. | |
Set thresholds for (in)equality tests | |
| static void | setEpsilonD (double anEpsilon) |
| Set threshold for equality tests between double numbers. | |
| static void | setEpsilonF (float anEpsilon) |
| Set threshold for equality test between float numbers. | |
| static void | setEpsilonI (int anEpsilon) |
| Set threshold for equality tests between int numbers. | |
| static void | setEpsilonRadian (double anEpsilon) |
| Set threshold for equality tests between angles in radians. | |
| static void | setEpsilonDegree (double anEpsilon) |
| Set threshold for equality tests between angles in degrees. | |
Static Public Attributes | |
Constants to preserve compatibility with Windows OS | |
Most of these constants are defined in math.h<b> when using a Unix/Linux OS, but are not available when using a Windows OS. | |
| static const double | QG_DOUBLE_MAX = 1.79769313486231570e+308 |
| Maximum double number. | |
| static const double | QG_DOUBLE_MIN = 4.94065645841246544e-324 |
| Minimum double number. | |
| static const float | QG_FLOAT_MAX = 3.40282346638528860e+38 |
| Maximum float number. | |
| static const float | QG_FLOAT_MIN = 1.40129846432481707e-45 |
| Minimum float number. | |
Constants related to e | |
| static const double | QG_E = 2.7182818284590452354 |
Value of . | |
| static const double | QG_LOG2E = 1.4426950408889634074 |
Value of . | |
| static const double | QG_LOG10E = 0.43429448190325182765 |
Value of . | |
| static const double | QG_LN2 = 0.69314718055994530942 |
Value of . | |
| static const double | QG_LN10 = 2.30258509299404568402 |
Value of . | |
Constants related to Pi | |
| static const double | QG_2PI = 6.28318530717958647692 |
Value of . | |
| static const double | QG_PI = 3.14159265358979323846 |
Value of . | |
| static const double | QG_PI_2 = 1.57079632679489661923 |
Value of . | |
| static const double | QG_PI_3 = 1.04719755119659774615 |
Value of . | |
| static const double | QG_PI_4 = 0.78539816339744830962 |
Value of . | |
| static const double | QG_PI_6 = 0.52359877559829887308 |
Value of . | |
| static const double | QG_SQRT_2PI = 2.50662827463100050242 |
Value of . | |
| static const double | QG_SQRT_PI = 1.77245385090551602730 |
Value of . | |
| static const double | QG_1_2PI = 0.15915494309189533577 |
Value of . | |
| static const double | QG_1_PI = 0.31830988618379067154 |
Value of . | |
| static const double | QG_1_SQRT_2PI = 0.39894228040143267794 |
Value of . | |
| static const double | QG_1_SQRT_PI = 0.56418958354775628695 |
Value of . | |
| static const double | QG_2_PI = 0.63661977236758134308 |
Value of . | |
| static const double | QG_2_SQRT_PI = 1.12837916709551257390 |
Value of . | |
Constants related to sqrt(2) | |
| static const double | QG_SQRT_2 = 1.41421356237309504880 |
Value of . | |
| static const double | QG_1_SQRT_2 = 0.70710678118654752440 |
Value of . | |
Constants related to sqrt(3) | |
| static const double | QG_SQRT_3 = 1.73205080756887729353 |
Value of . | |
| static const double | QG_1_SQRT_3 = 0.57735026918962576451 |
Value of . | |
Constants for conversions | |
| static const double | QG_RADIANS_TO_DEGREES = 57.2957795130823208768 |
Mutiplication factor to convert radians to degrees ( ). | |
| static const double | QG_DEGREES_TO_RADIANS = 0.01745329251994329577 |
Mutiplication factor to convert degrees to radians ( ). | |
Constants related to limits | |
| static const int | QG_SQRT_MAX_INT16b = 46340 |
| Square root of the maximum positive integer coded on 16 bits (4 bytes: 0x7fffffff). | |
Private Member Functions | |
Constructors | |
| Math () | |
| Disabled default constructor. | |
Static Private Attributes | |
Thresholds for (in)equality tests | |
| static double | _s_epsilon_double = 0.0001 |
| Threshold to test (in)equality between double numbers (default 1.e-4). | |
| static float | _s_epsilon_float = 0.0001f |
| Threshold to test (in)equality between float numbers (default 1.e-4). | |
| static int | _s_epsilon_int = 1 |
| Threshold to test (in)equality between integer numbers (default 1). | |
| static double | _s_epsilon_radian = 0.005 |
Threshold for testing (in)equality between angles in radians (default 0.005 radian 0.25 degree). | |
| static double | _s_epsilon_degree = 0.25 |
| Threshold for testing (in)equality between angles in degrees (default 0.25 degree). | |
Thresholds for numeric calculus | |
| static double | _s_rel_error_fp = 1.e-12 |
| Relative error for floating point numeric calculus (default 1.e-12). | |
|
|
Disabled default constructor.
|
|
|
Get threshold for equality tests between double numbers.
Definition at line 555 of file math.H. References _s_epsilon_double. |
|
|
Get threshold for equality tests between angles in degrees.
Definition at line 591 of file math.H. References _s_epsilon_degree. |
|
|
Get threshold for equality tests between float numbers.
Definition at line 564 of file math.H. References _s_epsilon_float. |
|
|
Get threshold for equality tests between int numbers.
Definition at line 573 of file math.H. References _s_epsilon_int. |
|
|
Get threshold for equality tests between angles in radians.
Definition at line 582 of file math.H. References _s_epsilon_radian. |
|
|
Get relative error for floating point numeric calculus.
Definition at line 541 of file math.H. References _s_rel_error_fp. Referenced by qgar::qgErf(), and qgar::qgErfc(). |
|
|
Set threshold for equality tests between double numbers.
Definition at line 619 of file math.H. References _s_epsilon_double. |
|
|
Set threshold for equality tests between angles in degrees.
Definition at line 655 of file math.H. References _s_epsilon_degree. |
|
|
Set threshold for equality test between float numbers.
Definition at line 628 of file math.H. References _s_epsilon_float. |
|
|
Set threshold for equality tests between int numbers.
Definition at line 637 of file math.H. References _s_epsilon_int. |
|
|
Set threshold for equality tests between angles in radians.
Definition at line 646 of file math.H. References _s_epsilon_radian. |
|
|
Set relative error for floating point numeric calculus.
Definition at line 605 of file math.H. References _s_rel_error_fp. |
|
|
Threshold for testing (in)equality between angles in degrees (default 0.25 degree).
Definition at line 263 of file math.C. Referenced by epsilonDegree(), and setEpsilonDegree(). |
|
|
Threshold to test (in)equality between double numbers (default 1.e-4).
Definition at line 243 of file math.C. Referenced by epsilonD(), and setEpsilonD(). |
|
|
Threshold to test (in)equality between float numbers (default 1.e-4).
Definition at line 248 of file math.C. Referenced by epsilonF(), and setEpsilonF(). |
|
|
Threshold to test (in)equality between integer numbers (default 1).
Definition at line 253 of file math.C. Referenced by epsilonI(), and setEpsilonI(). |
|
|
Threshold for testing (in)equality between angles in radians (default 0.005 radian
Definition at line 258 of file math.C. Referenced by epsilonRadian(), and setEpsilonRadian(). |
|
|
Relative error for floating point numeric calculus (default 1.e-12). The default value corresponds to 12 significant figures. It can be adjusted to trade off between accuracy and speed: See functions qgar::Math::relError and qgar::Math::setRelError.
Definition at line 274 of file math.C. Referenced by relError(), and setRelError(). |
|
|
Value of
|
|
|
Value of
|
|
|
Value of
|
|
|
Value of
Definition at line 166 of file math.C. Referenced by qgar::MASK1DGAUSSD1_phi1(), and qgar::MASK1DGAUSSD2_phi2(). |
|
|
Value of
|
|
|
Value of
Definition at line 162 of file math.C. Referenced by qgar::qgErfc(). |
|
|
Value of
|
|
|
Value of
Definition at line 175 of file math.C. Referenced by qgar::qgErf(). |
|
|
Value of
Definition at line 140 of file math.C. Referenced by qgar::GenArc< T >::angle(), qgar::Maer::PRIVATEcomputeMaer(), qgar::qgAngle(), and RWARCVECTOR_bestAttributes(). |
|
|
Mutiplication factor to convert degrees to radians (
Definition at line 223 of file math.C. Referenced by qgar::qgDegreesToRadians(). |
|
|
Maximum double number.
|
|
|
Minimum double number.
|
|
|
Value of
|
|
|
Maximum float number.
|
|
|
Minimum float number.
|
|
|
Value of
|
|
|
Value of
|
|
|
Value of
|
|
|
Value of
|
|
|
Value of
Definition at line 120 of file math.C. Referenced by qgar::GenConvexHull< T >::PRIVATEgraham_sScan(), qgar::qgIntersect(), qgar::qgSlope(), and qgar::RWArcVector::RWArcVector(). |
|
|
Value of
Definition at line 124 of file math.C. Referenced by RWARCVECTOR_bestAttributes(). |
|
|
Value of
|
|
|
Value of
|
|
|
Value of
|
|
|
Mutiplication factor to convert radians to degrees (
Definition at line 219 of file math.C. Referenced by qgar::qgRadiansToDegrees(). |
|
|
Value of
Definition at line 187 of file math.C. Referenced by qgar::MASK1DGAUSS_phi0(). |
|
|
Value of
|
|
|
Value of
|
|
|
Square root of the maximum positive integer coded on 16 bits (4 bytes: 0x7fffffff).
Definition at line 233 of file math.C. Referenced by qgar::WDSegmentList::PRIVATEperform(). |
|
|
Value of
|