Isosurface.Sampler.sdTorusY C# (CSharp) Method

sdTorusY() public static method

public static sdTorusY ( Vector3 p, Vector2 t ) : float
p Vector3
t Vector2
return float
        public static float sdTorusY(Vector3 p, Vector2 t)
        {
            return (float)Math.Sqrt(Math.Pow((float)Math.Abs(Math.Sqrt(p.X * p.X + p.Z * p.Z)) - t.X, 2.0f) + p.Y * p.Y) - t.Y;
            Vector2 q = new Vector2((float)Math.Abs(Math.Sqrt(p.X * p.X + p.Z * p.Z)) - t.X, p.Y);
            return q.Length() - t.Y;
        }