<QtMath> - Generic Math Declarations
The <QtMath> header file includes generic math declarations. More...
Functions
float | qDegreesToRadians(float degrees) |
double | qDegreesToRadians(double degrees) |
float | qRadiansToDegrees(float radians) |
double | qRadiansToDegrees(double radians) |
These functions are partly convenience definitions for basic operations, for instance not available in the Standard Template Library et al.
Function Documentation
float qDegreesToRadians(float degrees)
The function converts the degrees in float to radians.
The purpose of the function is to aid the conversion as such a convenient function is not part of the Standard Template Library, i.e. in <cmath> or elsewhere.
Example:
float degrees = 180.0f float radians = qDegreesToRadians(degrees)
This function was introduced in Qt 5.1.
See also qRadiansToDegrees().
double qDegreesToRadians(double degrees)
The function converts the degrees in double to radians.
The purpose of the function is to aid the conversion as such a convenient function is not part of the Standard Template Library, i.e. in <cmath> or elsewhere.
Example:
double degrees = 180.0 double radians = qDegreesToRadians(degrees)
This function was introduced in Qt 5.1.
See also qRadiansToDegrees().
float qRadiansToDegrees(float radians)
The function converts the radians in float to degrees.
The purpose of the function is to aid the conversion as such a convenient function is not part of the Standard Template Library, i.e. in <cmath> or elsewhere.
Example:
float radians = float(M_PI) float degrees = qRadiansToDegrees(radians)
This function was introduced in Qt 5.1.
See also qDegreesToRadians().
double qRadiansToDegrees(double radians)
The function converts the radians in double to degrees.
The purpose of the function is to aid the conversion as such a convenient function is not part of the Standard Template Library, i.e. in <cmath> or elsewhere.
Example:
double radians = M_PI double degrees = qRadiansToDegrees(radians)
This function was introduced in Qt 5.1.
See also qDegreesToRadians().