Added function for flipping CellDir directions
This commit is contained in:
parent
dda3416a6a
commit
76ab78d565
1 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,18 @@ impl CellDir {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn flip(&self) -> Self {
|
||||||
|
match self {
|
||||||
|
CellDir::TR => CellDir::BL,
|
||||||
|
CellDir::BR => CellDir::TL,
|
||||||
|
CellDir::B => CellDir::T,
|
||||||
|
CellDir::BL => CellDir::TR,
|
||||||
|
CellDir::TL => CellDir::BR,
|
||||||
|
CellDir::T => CellDir::B,
|
||||||
|
CellDir::C => CellDir::T,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn is_output(&self) -> bool {
|
pub fn is_output(&self) -> bool {
|
||||||
let e = self.as_edge();
|
let e = self.as_edge();
|
||||||
|
|
Loading…
Reference in a new issue