Skip to main content

position_recipe

Function position_recipe 

Source
pub fn position_recipe<F, O>(
    o: &O,
    value: <O as Ops<F>>::I,
    size: i64,
) -> (<O as Ops<F>>::I, <O as Ops<F>>::B)
where F: Float, O: Ops<F> + ?Sized,
Expand description

Position i on an axis of length size, where a negative i counts back from the end. Adding size to a negative position without a branch keeps a loop over positions vectorised. A position outside the axis is then at least size.