public static Vector3 BoardToWorldPosition(CubicHexCoord boardPos) { var worldPos = boardPos.ToAxial().ToPixel(); return(new Vector3 { x = worldPos.x, z = worldPos.y }); }
public void Round() { FloatCubic floatCubic = new FloatAxial(1.2f, 2.2f).ToFloatCubic(); CubicHexCoord rounded = floatCubic.Round(); AxialHexCoord axial = rounded.ToAxial(); Assert.That(axial.q, Is.EqualTo(1)); Assert.That(axial.r, Is.EqualTo(2)); }