Пример #1
0
        public static PointI HexToPixel(OffsetPoint hex, int hexSize)
        {
            int x = (int)(hexSize * 3.0 / 2.0 * hex.Q);
            int y = (int)(hexSize * Math.Sqrt(3) * (hex.R + 0.5 * (hex.Q & 1)));

            return(new PointI(x, y));
        }
Пример #2
0
 public TValue this[OffsetPoint key]
 {
     get { return(this[key.ToAxial()]); }
     set { this[key.ToAxial()] = value; }
 }