11 #ifndef QWT_POINT_POLAR_H 12 #define QWT_POINT_POLAR_H 34 void setPoint(
const QPointF & );
35 QPointF toPoint()
const;
40 double radius()
const;
41 double azimuth()
const;
46 void setRadius(
double );
47 void setAzimuth(
double );
129 #ifndef QT_NO_DEBUG_STREAM 134 double radius,
double angle )
136 const double x = pole.x() + radius * std::cos( angle );
137 const double y = pole.y() - radius * std::sin( angle );
139 return QPoint( qRound( x ), qRound( y ) );
143 double radius,
double angle )
149 double radius,
double angle )
151 const double x = pole.x() + radius * std::cos( angle );
152 const double y = pole.y() - radius * std::sin( angle );
154 return QPointF( x, y);
158 double radius,
double angle )
164 double radius,
double angle )
166 const double x = pole.x() + radius * qFastCos( angle );
167 const double y = pole.y() - radius * qFastSin( angle );
169 return QPointF( x, y);
173 double radius,
double angle )
void setAzimuth(double)
Sets the atimuth to atimuth.
A point in polar coordinates.
constexpr bool operator!=(const optional< T > &lhs, const optional< U > &rhs)
relop
bool operator==(fp x, fp y)
double & rRadius()
Returns the radius.
QPoint qwtPolar2Pos(const QPoint &pole, double radius, double angle)
QPointF qwtFastPolar2Pos(const QPointF &pole, double radius, double angle)
double radius() const
Returns the radius.
void setRadius(double)
Sets the radius to radius.
bool isNull() const
Returns true if radius() >= 0.0.
double azimuth() const
Returns the azimuth.
QwtPointPolar qwtFastPos2Polar(const QPointF &pos)
QPointF qwtFastDegree2Pos(const QPointF &pole, double radius, double angle)
double & rAzimuth()
Returns the azimuth.
bool isValid() const
Returns true if radius() >= 0.0.
QPoint qwtDegree2Pos(const QPoint &pole, double radius, double angle)
QWT_EXPORT QDebug operator<<(QDebug, const QwtPointPolar &)
double qwtSqr(double x)
Return the square of a number.
double qwtFastAtan2(double y, double x)
Approximation of arc tangent ( error below 0,005 radians )