38 extern const double PI;
45 extern const double E;
73 return (std::fabs(f1 - f2) <= tolerance);
86 return floatingPointEqual(f1, f2, (T) std::numeric_limits<T>::epsilon() * std::fmax(fabs(f1), fabs(f2)));
double vectorAngle(double x, double y)
Returns the angle in degrees from the origin to the specified point.
Definition: gmath.cpp:66
bool floatingPointEqual(T f1, T f2, T tolerance)
Returns true if the two given floating-point numbers are "equal" to each other, within a given tolera...
Definition: gmath.h:72
double tanDegrees(double angle)
Returns the trigonometric tangent of angle, which is expressed in degrees.
Definition: gmath.cpp:54
double toRadians(double degrees)
Converts an angle from degrees to radians.
Definition: gmath.cpp:62
int countDigits(int n, int base)
Definition: gmath.cpp:33
double vectorDistance(double x, double y)
Computes the distance between the origin and the specified point.
Definition: gmath.cpp:75
const double PI
The mathematical constant pi, which is the ratio of the circumference of a circle to its diameter...
Definition: gmath.h:38
double cosDegrees(double angle)
Returns the trigonometric cosine of angle, which is expressed in degrees.
Definition: gmath.cpp:29
double sinDegrees(double angle)
Returns the trigonometric sine of angle, which is expressed in degrees.
Definition: gmath.cpp:50
double toDegrees(double radians)
Converts an angle from radians to degrees.
Definition: gmath.cpp:58
const double E
Constant: E The mathematical constant e, which is the base of natural logarithms. ...
Definition: gmath.h:45