Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Rectangle

Index

Constructors

constructor

  • new Rectangle(x: number, X: number, y: number, Y: number): Rectangle

Properties

X

X: number

Y

Y: number

x

x: number

y

y: number

Methods

cx

  • cx(): number

cy

  • cy(): number

height

  • height(): number

inflate

lineIntersections

  • lineIntersections(x1: number, y1: number, x2: number, y2: number): Array<Point>
  • return any intersection points between the given line and the sides of this rectangle

    method

    lineIntersection

    Parameters

    • x1: number

      number first x coord of line

    • y1: number

      number first y coord of line

    • x2: number

      number second x coord of line

    • y2: number

      number second y coord of line

    Returns Array<Point>

    any intersection points found

overlapX

overlapY

rayIntersection

  • rayIntersection(x2: number, y2: number): Point
  • return any intersection points between a line extending from the centre of this rectangle to the given point, and the sides of this rectangle

    method

    lineIntersection

    Parameters

    • x2: number

      number second x coord of line

    • y2: number

      number second y coord of line

    Returns Point

    any intersection points found

setXCentre

  • setXCentre(cx: number): void

setYCentre

  • setYCentre(cy: number): void

union

vertices

width

  • width(): number

Static empty

Static lineIntersection

  • lineIntersection(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, x4: number, y4: number): Point
  • Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • x3: number
    • y3: number
    • x4: number
    • y4: number

    Returns Point

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc