mag()
Math / CalculationDescription
Calculates the magnitude (length) of a vector. Supports 2D and 3D.
Syntax
float mag(float x, float y)
float mag(float x, float y, float z)
Parameters
| Name | Type | Description |
|---|---|---|
| x | float | x component |
| y | float | y component |
| z | float | z component (optional) |
Returns
floatRelated
Under the Hood
Implementation in Processing.h / Processing.cpp:
Loading...