mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
don't use std::iter::Step on Coord
This commit is contained in:
parent
49dcb4f3ba
commit
33e135c614
2 changed files with 3 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ pub trait Coord: Send + Sync + Copy
|
|||
+ From<u16> + Into<u16>
|
||||
+ Into<usize>
|
||||
+ Into<f64>
|
||||
+ std::iter::Step
|
||||
//+ std::iter::Step
|
||||
{
|
||||
/// Zero in own type.
|
||||
fn zero () -> Self { 0.into() }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ pub trait Lrtb<N: Coord>: Xywh<N> {
|
|||
// FIXME: factor origin
|
||||
[self.x(), self.y(), self.x()+self.w(), self.y()+self.h()]
|
||||
}
|
||||
fn iter_x (&self) -> impl Iterator<Item = N> where Self: HasOrigin {
|
||||
fn iter_x (&self) -> std::ops::Range<N> where Self: HasOrigin {
|
||||
self.x_west()..self.x_east()
|
||||
}
|
||||
fn x_west (&self) -> N where Self: HasOrigin {
|
||||
|
|
@ -26,7 +26,7 @@ pub trait Lrtb<N: Coord>: Xywh<N> {
|
|||
fn x_center (&self) -> N where Self: HasOrigin {
|
||||
todo!()
|
||||
}
|
||||
fn iter_y (&self) -> impl Iterator<Item = N> where Self: HasOrigin {
|
||||
fn iter_y (&self) -> std::ops::Range<N> where Self: HasOrigin {
|
||||
self.y_north()..self.y_south()
|
||||
}
|
||||
fn y_north (&self) -> N where Self: HasOrigin {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue