%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
Distance3D Method
See Also  Example
vdWebLibrary Namespace > vdgeo Class : Distance3D Method
point1
The first point.
point2
The second point.
Calculates and returns the distance between the two passed points in three dimensions.

Syntax

JScript 
public function Distance3D( 
   point1 : Object,
   point2 : Object
) : double;

Parameters

point1
The first point.
point2
The second point.

Return Value

A numerical value that represents the distance in drawing units.

Example

C#Copy Code
var distance = vdgeo.Distance2D(vdgeo.newpoint(0, 0, 0), vdgeo.newpoint(10,10 ,10)); 
vdcanvas.Prompt('Distance = ' + distance.toString());

See Also