search

Class myphysicslab.lab.util.DoubleRect

Provided By

A rectangle whose boundaries are stored with double floating point precision. This is an immutable class: once an instance is created it cannot be changed.

Note that for DoubleRect we regard the vertical coordinate as increasing upwards, so the top coordinate is greater than the bottom coordinate. This is in contrast to HTML5 canvas where vertical coordinates increase downwards.

new DoubleRect( left, bottom, right, top_ )

Parameters
leftnumber

left side of DoubleRect, must be less than right

bottomnumber

bottom of DoubleRect, must be less than top

rightnumber

right side of DoubleRect

top_number

top of DoubleRect

Throws
(Error|null)

when left > right or bottom > top

Instance Methods

Static Functions

Static Properties