gmath.h
PI
and E
.
Constants | |
The mathematical constant pi, which is the ratio of the circumference of a circle to its diameter. | |
The mathematical constant e, which is the base of natural logarithms. | |
Functions | |
Returns the trigonometric sine of angle , which is expressed in degrees. | |
Returns the trigonometric cosine of angle , which is expressed in degrees. | |
Returns the trigonometric tangent of angle , which is expressed in degrees. | |
Converts an angle from radians to degrees. | |
Converts an angle from degrees to radians. | |
Computes the distance between the origin and the specified point. | |
Returns the angle in degrees from the origin to the specified point. |
double sinDegrees(double angle);
angle
, which is
expressed in degrees.
Usage:
sine = sinDegrees(angle);
double cosDegrees(double angle);
angle
, which is
expressed in degrees.
Usage:
cosine = cosDegrees(angle);
double tanDegrees(double angle);
angle
, which is
expressed in degrees.
Usage:
tangent = tanDegrees(angle);
double toDegrees(double radians);
Usage:
degrees = toDegrees(radians);
double toRadians(double degrees);
Usage:
radians = toRadians(degrees);
double vectorDistance(double x, double y);
Usage:
r = vectorDistance(x, y);
double vectorAngle(double x, double y);
Usage:
angle = vectorAngle(x, y);