Isosurface.Sampler.sdHexPrism C# (CSharp) Method

sdHexPrism() public static method

public static sdHexPrism ( Vector3 p, Vector2 h ) : float
p Vector3
h Vector2
return float
        public static float sdHexPrism(Vector3 p, Vector2 h)
        {
            Vector3 q = p.Abs();
            return Math.Max(q.Z - h.Y, Math.Max((q.X * 0.866025f + q.Y * 0.5f), q.Y) - h.X);
        }