DistanceToBox: Distance to a line segment 'DistanceToBox' Computes the...

Description Usage Arguments Value

Description

Distance to a line segment DistanceToBox Computes the distance between a point and the nearest point on a box (0 if in the box)

Usage

1
DistanceToBox(px, py, ax, ay, bx, by, cx, cy, dx, dy)

Arguments

px

The x coordinate of a point.

py

The y coordinate of a point.

ax

The x coordinate of the bottom-left of the box.

ay

The y coordinate of the bottom-left of the box.

bx

The x coordinate of the bottom-right of the box.

by

The y coordinate of the bottom-right of the box.

cx

The x coordinate of the top-right of the box.

cy

The y coordinate of the top-right of the box.

dx

The xcoordinates of the top-left of the box.

dy

The y coordinate of the top-left of the box.

Value

The squared distance.


NumbersInternational/qrserver documentation built on May 7, 2019, 7:19 p.m.