Isosurface.Sampler.SphereR C# (CSharp) Method

SphereR() public static method

public static SphereR ( Vector3 pos ) : float
pos Vector3
return float
        public static float SphereR(Vector3 pos)
        {
            float radius = (float)Resolution / 3.0f - 2.0f + Noise(pos) * 7.0f;
            Vector3 origin = new Vector3((Resolution - 2.0f) * 0.5f);
            return (pos - origin).LengthSquared() - radius * radius;
        }