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)); }
public TValue this[OffsetPoint key] { get { return(this[key.ToAxial()]); } set { this[key.ToAxial()] = value; } }