Function layout_2013::display_list::gradient::distance_to_sides

source ยท
fn distance_to_sides<F>(
    size: &Size2D<Au>,
    center: &Point2D<Au>,
    cmp: F,
) -> Size2D<Au>
where F: Fn(Au, Au) -> Au,
Expand description

Returns the distance to the nearest or farthest sides depending on the comparator.

The first return value is horizontal distance the second vertical distance.