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

Method mag

core/src/processing/core/PVector.java:415–417  ·  view source on GitHub ↗

( begin auto-generated from PVector_mag.xml ) Calculates the magnitude (length) of the vector and returns the result as a float (this is simply the equation sqrt(x x + y y + z z) .) ( end auto-generated ) @webref pvector:method @usage web_application @brief Calculate the magnitude of the

()

Source from the content-addressed store, hash-verified

413 * @see PVector#magSq()
414 */
415 public float mag() {
416 return (float) Math.sqrt(x*x + y*y + z*z);
417 }
418
419
420 /**

Callers 1

normalizeMethod · 0.95

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected