[]
        
(Showing Draft Content)

Point Class

Point Class

Class that represents a point (with x and y coordinates).

Heirarchy

  • Point

Constructors

Properties

Methods

Constructors

constructor

  • new Point(x?: number, y?: number): Point
  • Initializes a new instance of the Point class.

    Parameters

    • Optional x: number

      X coordinate of the new Point.

    • Optional y: number

      Y coordinate of the new Point.

    Returns Point

Properties

x

x: number

Gets or sets the x coordinate of this Point.

y

y: number

Gets or sets the y coordinate of this Point.

Methods

clone

equals

  • equals(pt: Point, dx?: number, dy?: number): boolean
  • Returns true if a Point has the same coordinates as this Point.

    Parameters

    • pt: Point

      Point to compare to this Point.

    • Optional dx: number

      tolerance for x position difference

    • Optional dy: number

      tolerance for y position difference

    Returns boolean