@bodil/dom
    Preparing search index...

    Namespace geometry

    Geometry tools.

    Type Aliases

    Rectangle

    Valid types representing rectangles.

    Functions

    contains

    Test whether the rectangle inner is fully contained inside the rectangle outer.

    containsHeightRange

    Test if a rectangle lies fully within a given Y coordinate bound.

    containsHeightRatio

    Decide how much of a rectangle lies within a given Y coordinate bound. Returns a value between 0 and 1.

    containsPoint

    Test whether the point p lies inside the rectangle rect.

    fitRect

    Return a DOMRect that is aligned inside outer while preserving the aspect ratio of inner.

    intersects

    Test whether the rectangles rectA and rectB intersect.

    intersectsHeight

    Test if a rectangle intersects with a given Y coordinate.

    intersectsHeightRange

    Test if a rectangle intersects with a given Y coordinate bound.

    roundByDPR

    Round a value to the window's device pixel ratio.