figureone
    Preparing search index...

    An object representing a rectangle.

    // get Rect from Fig
    const { Rect } = Fig;

    // define a rect centered at origin with width 4 and height 2
    const r = new Rect(-2, -1, 4, 2);
    Index

    Constructors

    • Constructor

      Parameters

      • left: number

        left location

      • bottom: number

        bottom location

      • width: number

        rectangle width

      • height: number

        rectangle height

      Returns Rect

    Methods

    • Returns true if point is within or on the border of the rectangle

      Parameters

      Returns boolean

      const r = new Rect(-2, -1, 4, 2);

      // check if point is within the rectangle (will return `true`)
      const result = r.isPointInside([0, 1]);