Exemple #1
0
        public static GridPoint3 RoundToGridPoint(Vector3 vec)
        {
            var vec2D   = vec.To2DXZ();
            var point2D = PointyHexPoint.RoundToGridPoint(vec2D);
            var y       = Mathf.RoundToInt(vec.y);

            return(point2D.To3DXZ(y));
        }
Exemple #2
0
 public IEnumerable <GridPoint2> GetHexSpiralIterator(GridPoint2 origin, int ringCount)
 {
     return(PointyHexPoint.GetSpiralIterator(this, origin, ringCount));
 }