orx_funvec/d1/
into_index.rs

1use crate::index::{FromIndex, IntoIndex};
2
3const DIM: usize = 1;
4type Tuple = usize;
5
6impl IntoIndex<DIM> for Tuple {
7    #[inline(always)]
8    fn into_index(self) -> [usize; DIM] {
9        [self]
10    }
11}
12
13impl FromIndex<DIM> for Tuple {
14    #[inline(always)]
15    fn from_index(index: [usize; DIM]) -> Self {
16        index[0]
17    }
18}