A point in polar coordinates.
More...
#include <qwt_point_polar.h>
A point in polar coordinates.
In polar coordinates a point is determined by an angle and a distance. See http://en.wikipedia.org/wiki/Polar_coordinate_system
◆ QwtPointPolar() [1/4]
QwtPointPolar::QwtPointPolar |
( |
| ) |
|
|
inline |
Constructs a null point, with a radius and azimuth set to 0.0.
- See also
- QPointF::isNull()
◆ QwtPointPolar() [2/4]
QwtPointPolar::QwtPointPolar |
( |
double |
azimuth, |
|
|
double |
radius |
|
) |
| |
|
inline |
Constructs a point with coordinates specified by radius and azimuth.
- Parameters
-
azimuth | Azimuth |
radius | Radius |
◆ QwtPointPolar() [3/4]
Constructs a point using the values of the point specified.
- Parameters
-
◆ QwtPointPolar() [4/4]
QwtPointPolar::QwtPointPolar |
( |
const QPointF & |
p | ) |
|
Convert and assign values from a point in Cartesian coordinates
- Parameters
-
p | Point in Cartesian coordinates |
- See also
- setPoint(), toPoint()
◆ normalized()
Normalize radius and azimuth
When the radius is < 0.0 it is set to 0.0. The azimuth is a value >= 0.0 and < 2 * M_PI.
- Returns
- Normalized point
◆ operator!=()
bool QwtPointPolar::operator!= |
( |
const QwtPointPolar & |
other | ) |
const |
Compare 2 points
Two points are equal to each other if radius and azimuth-coordinates are the same. Points are not equal, when the azimuth differs, but other.azimuth() == azimuth() % (2 * PI).
- Returns
- True if the point is not equal to other; otherwise return false.
- See also
- normalized()
◆ operator==()
bool QwtPointPolar::operator== |
( |
const QwtPointPolar & |
other | ) |
const |
Compare 2 points.
Two points are equal to each other if radius and azimuth-coordinates are the same. Points are not equal, when the azimuth differs, but other.azimuth() == azimuth() % (2 * PI).
- Returns
- True if the point is equal to other; otherwise return false.
- See also
- normalized()
◆ setPoint()
void QwtPointPolar::setPoint |
( |
const QPointF & |
p | ) |
|
Convert and assign values from a point in Cartesian coordinates
- Parameters
-
p | Point in Cartesian coordinates |
◆ toPoint()
QPointF QwtPointPolar::toPoint |
( |
| ) |
const |
Convert and return values in Cartesian coordinates
- Returns
- Converted point in Cartesian coordinates
- Note
- Invalid or null points will be returned as QPointF(0.0, 0.0)
- See also
- isValid(), isNull()