MCPcopy Index your code
hub / github.com/processing/processing / normalize

Method normalize

core/src/processing/core/PVector.java:803–809  ·  view source on GitHub ↗

( begin auto-generated from PVector_normalize.xml ) Normalize the vector to length 1 (make it a unit vector). ( end auto-generated ) @webref pvector:method @usage web_application @brief Normalize the vector to a length of 1

()

Source from the content-addressed store, hash-verified

801 * @brief Normalize the vector to a length of 1
802 */
803 public PVector normalize() {
804 float m = mag();
805 if (m != 0 && m != 1) {
806 div(m);
807 }
808 return this;
809 }
810
811
812 /**

Callers 2

limitMethod · 0.95
setMagMethod · 0.95

Calls 3

magMethod · 0.95
divMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected