Project/02 - Engine/LittleBigEngine/Math/HexUtils.cs
/// <summary>
/// Returns the center of an hexagon.
/// </summary>
/// <param name="hex"></param>
/// <returns></returns>
Returns the center of an hexagon.
Returns the center of an hexagon .
public static Vector2 HexToVector(Hex hex)
        {
            Vector2 xy;
            xy.X = UStep.X * hex.U;
            xy.Y = VStep.Y * hex.V + UStep.Y * Math.Abs(hex.U % 2);
            return xy;
        }
public static Vector2 HexToVector ( Hex hex ) { Vector2 xy ; xy . X = UStep . X * hex . U ; xy . Y = VStep . Y * hex . V + UStep . Y * Math . Abs ( hex . U % 2 ) ; return xy ; }
Returns the center of an hexagon.
Returns the center of an hexagon .
None
hex
Hex
None