Class Rectangle

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(x: number, y: number, width: number, height: number): Rectangle

Parameters

  • x: number
  • y: number
  • width: number
  • height: number

Returns

Rectangle

Properties

public height: number

public width: number

public x: number

public y: number

Methods

public clone(): Rectangle

Returns

Rectangle

public contains(x: number, y: number): boolean

Parameters

  • x: number
  • y: number

Returns

boolean