MCPcopy Index your code
hub / github.com/benfry/processing4 / mag

Method mag

core/src/processing/core/PVector.java:396–398  ·  view source on GitHub ↗

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) .) @webref pvector:method @usage web_application @webBrief Calculate the magnitude of the vector @return magnitude (length) of the vector @see PVector#magSq

()

Source from the content-addressed store, hash-verified

394 * @see PVector#magSq()
395 */
396 public float mag() {
397 return (float) Math.sqrt(x*x + y*y + z*z);
398 }
399
400
401 /**

Callers 2

normalizeMethod · 0.95
setHeadingMethod · 0.95

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected