MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / normalized

Method normalized

3rdparty/qcustomplot/qcustomplot.cpp:176–181  ·  view source on GitHub ↗

! Returns a normalized version of this vector. The length of the returned vector is equal to 1. If the vector has both entries set to zero, this method returns the vector unmodified. \see normalize, length, lengthSquared */

Source from the content-addressed store, hash-verified

174 \see normalize, length, lengthSquared
175*/
176QCPVector2D QCPVector2D::normalized() const
177{
178 if (mX == 0.0 && mY == 0.0) return *this;
179 const double lenInv = 1.0/length();
180 return QCPVector2D(mX*lenInv, mY*lenInv);
181}
182
183/*! \overload
184

Callers 6

drawMethod · 0.80
processRectSelectionMethod · 0.80
getBarRectMethod · 0.80
selectionHitBoxMethod · 0.80
selectTestMethod · 0.80
anchorPixelPositionMethod · 0.80

Calls 1

lengthFunction · 0.85

Tested by

no test coverage detected