Layout constructor

Layout(
  1. double left,
  2. double top,
  3. double width,
  4. double height,
)

Implementation

Layout(double left, double top, double width, double height) {
  this.left = left.isNaN ? 0 : left;
  this.top = top.isNaN ? 0 : top;
  this.width = width.isNaN ? 0 : width;
  this.height = height.isNaN ? 0 : height;
}