matrix-dom
    Preparing search index...

    Function alterCoordinates

    • Alter the coordinates of a point using a function. The point (or its coordinates) may be null, then the function receives null for those coordinates.

      Type Parameters

      • Value extends number | null

      Parameters

      • pnt: Point

        The point to alter (or null to start from empty coordinates)

      • fn: (coordinate: number, axis: Axis, point: Point) => Value

        Called with each coordinate, its axis and the whole point

      Returns PointLike<Value>

      A new point built from the altered coordinates

    • Alter the coordinates of a point using a function. The point (or its coordinates) may be null, then the function receives null for those coordinates.

      Type Parameters

      • Value extends number | null

      Parameters

      • pnt: PointLike<number | null> | null

        The point to alter (or null to start from empty coordinates)

      • fn: (
            coordinate: number | null,
            axis: Axis,
            point: PointLike<number | null> | null,
        ) => Value

        Called with each coordinate, its axis and the whole point

      Returns PointLike<Value>

      A new point built from the altered coordinates