%%PageItemTitle%%

VectorDraw Web Library

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

Syntax

JScript 
public function Distance2D( 
   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 ,0)); 
vdcanvas.Prompt('Distance = ' + distance.toString());

See Also