Module ilyvion_util::multi_dimensional[][src]

Provides methods for treating a one-dimensional array/slice as if it were a two-dimensional slice.

Structs

Vec2D

This struct represents a two-dimensional window into a one-dimensional Vec. This is accomplished through taking either a columns parameter, and dividing the size of the Vec evenly into rows based on its length.

Window2D

This struct represents a two-dimensional window into a one-dimensional slice. This is accomplished through taking either a columns parameter, and dividing the size of the slice evenly into rows based on its length, or by taking rows and columns directly, trusting that the caller provided correct values. The latter option provides a zero-cost abstraction.