20 #include "qgis_core.h" 96 double length()
const;
105 return mX * mX + mY * mY;
128 double angle()
const;
141 double crossProduct(
QgsVector v )
const;
168 QString str =
"Vector (";
177 SIP_PYOBJECT __repr__();
179 QString str = QStringLiteral(
"<QgsVector: %1>" ).arg( sipCpp->toString() );
180 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
185 double mX = 0.0, mY = 0.0;
191 #endif // QGSVECTOR_H
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Q_DECLARE_TYPEINFO(QgsVector, Q_MOVABLE_TYPE)
QgsMargins operator/(const QgsMargins &margins, double divisor)
Returns a QgsMargins object that is formed by dividing the components of the given margins by the giv...
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
QDateTime operator+(const QDateTime &start, QgsInterval interval)
A class to represent a vector.
QgsInterval operator-(const QDateTime &dt1, const QDateTime &dt2)
Returns the interval between two datetimes.
QString toString(int precision=17) const
Returns a string representation of the vector.
QgsMargins operator*(const QgsMargins &margins, double factor)
Returns a QgsMargins object that is formed by multiplying each component of the given margins by fact...
double lengthSquared() const
Returns the length of the vector.