MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / normalize

Method normalize

qcustomplot.cpp:152–157  ·  view source on GitHub ↗

! Normalizes this vector. After this operation, the length of the vector is equal to 1. \see normalized, length, lengthSquared */

Source from the content-addressed store, hash-verified

150 \see normalized, length, lengthSquared
151*/
152void QCPVector2D::normalize()
153{
154 double len = length();
155 mX /= len;
156 mY /= len;
157}
158
159/*!
160 Returns a normalized version of this vector. The length of the returned vector is equal to 1.

Callers 5

normalizedMethod · 0.80
sanitizedForLogScaleMethod · 0.80
sanitizedForLinScaleMethod · 0.80
getKeyRangeMethod · 0.80
getValueRangeMethod · 0.80

Calls 1

lengthFunction · 0.85

Tested by

no test coverage detected