math docs
    Preparing search index...

    Function expandByMargin

    • Expands a Box2 uniformly by a scalar margin on all sides Subtracts the margin from min and adds it to max on each axis

      Parameters

      • out: box2.Box2

        The output Box2

      • box: box2.Box2

        The input Box2

      • margin: number

        The uniform margin to expand by

      Returns box2.Box2

      The expanded Box2