stash inset cell function away
This commit is contained in:
parent
5b0a096502
commit
a81cc0073a
1 changed files with 10 additions and 0 deletions
10
src/Mono.cs
10
src/Mono.cs
|
@ -298,4 +298,14 @@ static class Mono
|
|||
new XYZi(+1, +1, -1),
|
||||
new XYZi(+1, +1, +1)
|
||||
};
|
||||
|
||||
static XYZi InsetCell(XYZi cell)
|
||||
{
|
||||
// [!] don't inset past 0
|
||||
return new(
|
||||
cell.x - Maths.sign(cell.x),
|
||||
cell.y - Maths.sign(cell.y),
|
||||
cell.z - Maths.sign(cell.z)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue