ixfx
    Preparing search index...

    Function divideScalar

    Divides all components of rect by amount. This includes x,y if present.

    divideScalar({ width:10, height:20 }, 2); // { width:5, height: 10 }
    divideScalar({ x: 1, y: 2, width:10, height:20 }, 2); // { x: 0.5, y: 1, width:5, height: 10 }
    • Divides all components of rect by amount.

      divideScalar({ width:10, height:20 }, 2); // { width:5, height: 10 }
      

      Parameters

      • rect: Rect
      • amount: number

      Returns Rect

    • Divides all components of rect by amount. This includes x,y if present.

      divideScalar({ width:10, height:20 }, 2); // { width:5, height: 10 }
      divideScalar({ x: 1, y: 2, width:10, height:20 }, 2); // { x: 0.5, y: 1, width:5, height: 10 }

      Parameters

      Returns RectPositioned