Constructors
constructor
- new Point(x: number, y: number, round?: boolean): Point
-
Parameters
-
x: number
-
y: number
-
Optional round: boolean
Properties
x
x: number
y
y: number
Methods
add
-
Parameters
clone
-
distanceTo
- distanceTo(otherPoint: Point): number
-
Parameters
Returns number
divideBy
- divideBy(number: number, round?: boolean): Point
-
Parameters
-
number: number
-
Optional round: boolean
equals
- equals(otherPoint: Point): boolean
-
Parameters
Returns boolean
multiplyBy
- multiplyBy(number: number): Point
-
Parameters
round
-
subtract
-
Parameters
toString
-
Returns string
Creates a Point object with the given x and y coordinates. If optional round is set to true, rounds the x and y values.