contains
Returns true if the point (x, y) is inside this solid by more than margin units, measured straight out of the nearest face (the slope's own surface, for a slope). A point on the surface is outside. This is the one place that decides what "inside" means: collision and SolidGrid.isSolidAt both ask it.
Samples
val grid = SolidGrid(columns = 4, rows = 4, tileSize = 16f)
val slope = grid.fill(1, 1, shape = SolidShape.RISING)
// A rising slope fills the tile's bottom-right half.
assertPrints(slope.contains(30f, 30f), "true")
assertPrints(slope.contains(18f, 18f), "false")Content copied to clipboard