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;
}