Skip to main content

Overview

This function calculates the distance between two points defined by their X and Y coordinates.

Parameters

distance(X1, Y1, X2, Y2)
  • X1: X coordinate of the first point.
  • Y1: Y coordinate of the first point.
  • X2: X coordinate of the second point.
  • Y2: Y coordinate of the second point.

Example

distance(0, 0, 3, 4)
Returns 5.0 (distance between origin and point (3,4)).
I