subsection

fun subsection(rectangle: Rectangle, westLerp: Double, southLerp: Double, eastLerp: Double, northLerp: Double, result: Rectangle? = definedExternally): Rectangle(source)

Computes a subsection of a rectangle from normalized coordinates in the range 0.0, 1.0.

Return

The modified result parameter or a new Rectangle instance if none was provided.

Parameters

rectangle

The rectangle to subsection.

westLerp

The west interpolation factor in the range 0.0, 1.0. Must be less than or equal to eastLerp.

southLerp

The south interpolation factor in the range 0.0, 1.0. Must be less than or equal to northLerp.

eastLerp

The east interpolation factor in the range 0.0, 1.0. Must be greater than or equal to westLerp.

northLerp

The north interpolation factor in the range 0.0, 1.0. Must be greater than or equal to southLerp.

result

The object onto which to store the result.

See also