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
Returns the vector's normalized (or "unit") vector (ie same angle but length of 1....
double angle() const
Returns the angle of the vector in radians.
QgsVector rotateBy(double rot) const
Rotates the vector by a specified angle.
QgsVector()=default
Default constructor for QgsVector.
double length() const
Returns the length of the vector.