Skip to main content Link Menu Expand (external link) Document Search Copy Copied

double dist3D()

Gets the 3D Euclidian distance between the current vector and the origin (0, 0, 0).

Returns

A double representing the Euclidian distance between the current vector and the origin

Explanation

See dist3D(PVector) for a detailed explanation.

Example

PVector v = PVector(3, 4, 1);
v.dist2D(); // Returns sqrt(26)

See Also