VS:Distance

From Vectorworks Developer
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Function Distance returns the distance between the two specified coordinate locations.

FUNCTION Distance(
x1 :REAL;
y1 :REAL;
x2 :REAL;
y2 :REAL) : REAL;
def vs.Distance(x1, y1, x2, y2):
    return REAL

Parameters

x1 REAL X coordinate of first point.
y1 REAL Y coordinate of first point.
x2 REAL X coordinate of second point.
y2 REAL Y coordinate of second point.

Example

VectorScript

d:=Distance(0,2,4,5);
{returns the distance between (0,2) and (4,5)}

Python

d= vs.Distance(0,2,4,5)

Version

Availability: from All Versions

See Also

VS Functions:

VS:Norm

VS Functions: [[VS:Norm]]