cleanup++
This commit is contained in:
parent
bd2f2edebb
commit
198aa0ebd0
@ -35,7 +35,6 @@ impl CoordinateOp for u8 {
|
|||||||
|
|
||||||
fn distance(x1: Self, y1: Self, x2: Self, y2: Self) -> Self {
|
fn distance(x1: Self, y1: Self, x2: Self, y2: Self) -> Self {
|
||||||
(max(x2, x1) - min(x2, x1)).saturating_add(max(y2, y1) - min(y2, y1))
|
(max(x2, x1) - min(x2, x1)).saturating_add(max(y2, y1) - min(y2, y1))
|
||||||
//(pow(x2 as u16 - x1 as u16, 2) + pow(y2 as u16 - y1 as u16, 2)).sqrt() as u8
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,6 @@ impl Stride {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StrideMapping<const STRIDE_NUM: usize = 24> {
|
pub struct StrideMapping<const STRIDE_NUM: usize = 24> {
|
||||||
pub strides: [Stride; STRIDE_NUM],
|
pub strides: [Stride; STRIDE_NUM],
|
||||||
pub stride_count: usize,
|
|
||||||
pub pixel_count: usize,
|
pub pixel_count: usize,
|
||||||
pub size: Rectangle<StrideSpace>
|
pub size: Rectangle<StrideSpace>
|
||||||
}
|
}
|
||||||
@ -188,7 +187,6 @@ impl<const STRIDE_NUM: usize> StrideMapping<STRIDE_NUM> {
|
|||||||
|
|
||||||
Self {
|
Self {
|
||||||
strides,
|
strides,
|
||||||
stride_count,
|
|
||||||
pixel_count: physical_idx,
|
pixel_count: physical_idx,
|
||||||
size: s
|
size: s
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user