Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Point

Represents a 2D Point

Hierarchy

  • Point

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Point(_x?: number, _y?: number): Point
  • Parameters

    • Default value _x: number = 0
    • Default value _y: number = 0

    Returns Point

Properties

Private _x

_x: number

Private _y

_y: number

Accessors

x

  • get x(): number

y

  • get y(): number

Methods

add

  • Adds coordinates to current point

    Parameters

    • coordX: number

      Added to current abscissa

    • coordY: number

      Added to current ordinate

    Returns Point

    Current Point

  • Moves Point following Vector

    Parameters

    • vect: Vector

      Vector to follow

    Returns Point

    Current Point

clone

set

  • set(newX: number, newY: number): Point
  • Replaces coordinates of current point

    Parameters

    • newX: number

      New abscissa

    • newY: number

      New ordinate

    Returns Point

    Current Point

sub

  • Substracts coordinates to current point

    Parameters

    • coordX: number

      Removed from current ordinate

    • coordY: number

    Returns Point

    Current Point

  • Substracts Vector to current point

    Parameters

    • vect: Vector

      Vector to substract

    Returns Point

    Current Point

Generated using TypeDoc