Function layout_2013::display_list::background::get_cyclic

source ยท
pub fn get_cyclic<T>(arr: &[T], index: usize) -> &T
Expand description

Access element at index modulo the array length.

Obviously it does not work with empty arrays.

This is used for multiple layered background images. See: https://drafts.csswg.org/css-backgrounds-3/#layering