Bounds

Class Bounds

constructor (xMin: number, xMax: number, yMin: number, yMax: number, errorHandling: swap|center): Bounds

Use the errorHandling option to decide how to deal with cases where the min and max values are in the wrong order.

Name Type Default Description  
xMin number      
xMax number      
yMin number      
yMax number      
errorHandling swap center    

Property .xMax : number

Property .xMin : number

Property .yMax : number

Property .yMin : number

Accessor .center : Point

Accessor .dx : number

Accessor .dy : number

Accessor .flip : Bounds

Accessor .rect : Rectangle

Accessor .xRange

Accessor .yRange

Method .contains (p: Point): boolean

Name Type Default Description
p Point    

Method .containsX (p: Point): boolean

Name Type Default Description
p Point    

Method .containsY (p: Point): boolean

Name Type Default Description
p Point    

Method .extend (top: number, right: number, bottom: number, left: number): Bounds

Name Type Default Description
top number    
right number  
bottom number  
left number  

Method .resize (dx: number, dy: number): Bounds

Name Type Default Description
dx number    
dy number    

Copyright © 2024 Mathigon.org