public Cell Normalize() { int nx = 0, ny = 0; if (X > 0) { nx = 1; } if (X < 0) { nx = -1; } if (Y > 0) { ny = 1; } if (Y < 0) { ny = -1; } return(CellManager.Get(nx, ny)); }
public static Cell operator *(int a, Cell cell) { return(CellManager.Get(cell.X * a, cell.Y * a)); }
public static Cell operator -(Cell first) { return(CellManager.Get(-first.X, -first.Y)); }
public static Cell operator -(Cell first, Cell second) { return(CellManager.Get(first.X - second.X, first.Y - second.Y)); }