Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public static Cell operator *(int a, Cell cell)
 {
     return(CellManager.Get(cell.X * a, cell.Y * a));
 }
Ejemplo n.º 3
0
 public static Cell operator -(Cell first)
 {
     return(CellManager.Get(-first.X, -first.Y));
 }
Ejemplo n.º 4
0
 public static Cell operator -(Cell first, Cell second)
 {
     return(CellManager.Get(first.X - second.X, first.Y - second.Y));
 }