splitAtZ

fun Box.splitAtZ(z: Double): List<Box>(source)

Splits the current Box into two smaller boxes along the z-axis at the specified position. If the provided z position lies outside the z-range of the current Box, the method returns a list containing only the original Box.

Return

A list of two Boxes resulting from the split operation if the z-coordinate is within range, or a singleton list containing the original Box if the split cannot be performed.

Parameters

z

The z-coordinate at which the Box should be split.