ixfx
    Preparing search index...

    Subtracts width/height from a.

    const rectA = { width: 100, height: 100 };
    const rectB = { width: 200, height: 200 };

    // Yields: { width: -100, height: -100 }
    Rects.subtract(rectA, rectB);
    Rects.subtract(rectA, 200, 200);
    • Subtracts width/height of b from a (ie: a - b), returning result. x,y of second parameter is ignored.

      const rectA = { width: 100, height: 100 };
      const rectB = { width: 200, height: 200 };

      // Yields: { width: -100, height: -100 }
      Rects.subtract(rectA, rectB);

      Parameters

      Returns Rect

    • Subtracts width/height of b from a (ie: a - b), returning result. x,y of second parameter is ignored.

      const rectA = { width: 100, height: 100 };
      const rectB = { width: 200, height: 200 };

      // Yields: { width: -100, height: -100 }
      Rects.subtract(rectA, rectB);

      Returns RectPositioned

    • Subtracts a width/height from a, returning result.

      const rect = { width: 100, height: 100 };
      Rects.subtract(rect, 200, 200);
      // Yields: { width: -100, height: -100 }

      Parameters

      • a: Rect
      • width: number
      • height: number

      Returns Rect

    • Subtracts width/height of b from a (ie: a - b), returning result. x,y of second parameter is ignored.

      const rectA = { width: 100, height: 100 };
      const rectB = { width: 200, height: 200 };

      // Yields: { width: -100, height: -100 }
      Rects.subtract(rectA, rectB);

      Parameters

      Returns RectPositioned