RECORD Point

Represents a simple data structure for coordinate information.

Public Methods

DistanceFromOrigin

public readonly double DistanceFromOrigin()

Calculates the distance from the origin (0,0) to this point.

Returns: double

  • The distance as a double value.

DistanceTo

public readonly double DistanceTo(Point other)

Calculates the distance between this point and another point.

Parameters:

  • other (Point): The other point to calculate distance to.

Returns: double

  • The distance between the two points.