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