23 const double angle = std::atan2( mY, mX ) + rot;
24 const double len =
length();
30 const double len =
length();
34 throw QgsException( QStringLiteral(
"normalized vector of null vector undefined" ) );
Defines a QGIS exception class.
A class to represent a vector.
QgsVector normalized() const SIP_THROW(QgsException)
Returns the vector's normalized (or "unit") vector (ie same angle but length of 1....
QgsVector rotateBy(double rot) const SIP_HOLDGIL
Rotates the vector by a specified angle.
double angle() const SIP_HOLDGIL
Returns the angle of the vector in radians.
QgsVector()=default
Default constructor for QgsVector.
double length() const SIP_HOLDGIL
Returns the length of the vector.