gradum-kit - v0.1.0
    Preparing search index...

    Function pointInsideRect

    • Function

      pointInsideRect

      Parameters

      • point: Coordinate

        The point to test.

      • rect: DOMRect

        The rectangle to test against.

      • Optionalmargin: number = 5

        How far outside the rectangle still counts as inside, in pixels.

      Returns boolean

      true if the point is inside the rectangle grown by margin.

      Check whether a point falls within a rectangle, with a tolerance band so a near miss still counts — useful for hit-testing against a pointer, which rarely lands exactly on target.