Functions | |
| double | cosDegrees(double angle) |
Returns the trigonometric cosine of angle, which is expressed in degrees. More... | |
| int | countDigits(int n, int base) |
| template<typename T > | |
| 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 tolerance. More... | |
| template<typename T > | |
| bool | floatingPointEqual(T f1, T f2) |
| Returns true if the two given floating-point numbers are "equal" to each other. More... | |
| template<typename T > | |
| bool | floatingPointEqual(T f1, int f2) |
| Returns true if the given floating-point number is "equal" to the given integer. More... | |
| template<typename T > | |
| bool | floatingPointEqual(int f1, T f2) |
| Returns true if the given floating-point number is "equal" to the given integer. More... | |
| template<typename T > | |
| bool | floatingPointEqual(T f1, long int f2) |
| Returns true if the given floating-point number is "equal" to the given integer. More... | |
| template<typename T > | |
| bool | floatingPointEqual(long int f1, T f2) |
| Returns true if the given floating-point number is "equal" to the given integer. More... | |
| double | sinDegrees(double angle) |
Returns the trigonometric sine of angle, which is expressed in degrees. More... | |
| double | tanDegrees(double angle) |
Returns the trigonometric tangent of angle, which is expressed in degrees. More... | |
| double | toDegrees(double radians) |
| Converts an angle from radians to degrees. More... | |
| double | toRadians(double degrees) |
| Converts an angle from degrees to radians. More... | |
| double | vectorAngle(double x, double y) |
| Returns the angle in degrees from the origin to the specified point. More... | |
| double | vectorAngle(const ::sgl::GPoint &pt) |
| Returns the angle in degrees from the origin to the specified point. More... | |
| double | vectorDistance(double x, double y) |
| Computes the distance between the origin and the specified point. More... | |
| double | vectorDistance(const ::sgl::GPoint &pt) |
| Computes the distance between the origin and the specified point. More... | |
Variables | |
| const double | E = 2.71828182845904523536 |
Constant: EThe mathematical constant e, which is the base of natural logarithms. More... | |
| const double | PI = 3.14159265358979323846 |
| The mathematical constant pi, which is the ratio of the circumference of a circle to its diameter. More... | |
| double cosDegrees | ( | double | angle | ) |
Returns the trigonometric cosine of angle, which is expressed in degrees.
| int countDigits | ( | int | n, |
| int | base | ||
| ) |
| bool sgl::math::floatingPointEqual | ( | T | f1, |
| T | f2, | ||
| T | tolerance | ||
| ) |
Returns true if the two given floating-point numbers are "equal" to each other, within a given tolerance.
Floating-point equality is tricky because of round-off errors, which can cause the numbers to be nearly the same but not identical.
See also: http://stackoverflow.com/questions/4548004/how-to-correctly-and-standardly-compare-floats
| bool sgl::math::floatingPointEqual | ( | T | f1, |
| T | f2 | ||
| ) |
Returns true if the two given floating-point numbers are "equal" to each other.
Floating-point equality is tricky because of round-off errors, which can cause the numbers to be nearly the same but not identical.
See also: http://stackoverflow.com/questions/4548004/how-to-correctly-and-standardly-compare-floats
| bool sgl::math::floatingPointEqual | ( | T | f1, |
| int | f2 | ||
| ) |
Returns true if the given floating-point number is "equal" to the given integer.
Floating-point equality is tricky because of round-off errors, which can cause the numbers to be nearly the same but not identical.
See also: http://stackoverflow.com/questions/4548004/how-to-correctly-and-standardly-compare-floats
| bool sgl::math::floatingPointEqual | ( | int | f1, |
| T | f2 | ||
| ) |
Returns true if the given floating-point number is "equal" to the given integer.
Floating-point equality is tricky because of round-off errors, which can cause the numbers to be nearly the same but not identical.
See also: http://stackoverflow.com/questions/4548004/how-to-correctly-and-standardly-compare-floats
| bool sgl::math::floatingPointEqual | ( | T | f1, |
| long int | f2 | ||
| ) |
Returns true if the given floating-point number is "equal" to the given integer.
Floating-point equality is tricky because of round-off errors, which can cause the numbers to be nearly the same but not identical.
See also: http://stackoverflow.com/questions/4548004/how-to-correctly-and-standardly-compare-floats
| bool sgl::math::floatingPointEqual | ( | long int | f1, |
| T | f2 | ||
| ) |
Returns true if the given floating-point number is "equal" to the given integer.
Floating-point equality is tricky because of round-off errors, which can cause the numbers to be nearly the same but not identical.
See also: http://stackoverflow.com/questions/4548004/how-to-correctly-and-standardly-compare-floats
| double sinDegrees | ( | double | angle | ) |
Returns the trigonometric sine of angle, which is expressed in degrees.
| double tanDegrees | ( | double | angle | ) |
Returns the trigonometric tangent of angle, which is expressed in degrees.
| double toDegrees | ( | double | radians | ) |
Converts an angle from radians to degrees.
| double toRadians | ( | double | degrees | ) |
Converts an angle from degrees to radians.
| double vectorAngle | ( | double | x, |
| double | y | ||
| ) |
Returns the angle in degrees from the origin to the specified point.
This function takes account of the fact that the graphics coordinate system is flipped in the y direction from the traditional Cartesian plane.
| double vectorAngle | ( | const ::sgl::GPoint & | pt | ) |
Returns the angle in degrees from the origin to the specified point.
This function takes account of the fact that the graphics coordinate system is flipped in the y direction from the traditional Cartesian plane.
| double vectorDistance | ( | double | x, |
| double | y | ||
| ) |
Computes the distance between the origin and the specified point.
| double vectorDistance | ( | const ::sgl::GPoint & | pt | ) |
Computes the distance between the origin and the specified point.
| const double E = 2.71828182845904523536 |
| const double PI = 3.14159265358979323846 |
The mathematical constant pi, which is the ratio of the circumference of a circle to its diameter.
1.8.14