Skip to content

function getDistance2d (shared-side)

Available since version: 0.3.0

Get the 2d distance between two points.

Declaration

number getDistance2d(number x1, number y1, number x2, number y2)

Parameters

  • number x1: The position on X axis of the first point.
  • number y1: The position on Y axis of the first point.
  • number x2: The position on X axis of the second point.
  • number y2: The position on Y axis of the second point.

Returns number

The distance between the two points.