public static CubeIndex OddFlatToCube(OffsetIndex o) { CubeIndex c; c.x = o.col; c.z = o.row - (o.col - (o.col & 1)) / 2; c.y = -c.x - c.z; return(c); }
public static CubeIndex OddPointyToCube(OffsetIndex o) { CubeIndex c; c.x = o.col - (o.row - (o.row & 1)) / 2; c.z = o.row; c.y = -c.x - c.z; return(c); }
public static CubeIndex OddPointyToCube(OffsetIndex o) { CubeIndex c; c.x = o.col - (o.row - (o.row&1)) / 2; c.z = o.row; c.y = -c.x - c.z; return c; }
public static CubeIndex OddFlatToCube(OffsetIndex o) { CubeIndex c; c.x = o.col; c.z = o.row - (o.col - (o.col&1)) / 2; c.y = -c.x - c.z; return c; }