R3.Geometry.Sphere.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals( object obj )
        {
            Sphere s = (Sphere)obj;

            if( IsPlane )
            {
                if( !s.IsPlane )
                    return false;

                Vector3D n1 = this.Normal;
                n1.Normalize();
                Vector3D n2 = s.Normal;
                n2.Normalize();
                return
                    ( n1 == n2 || n1 == -n2 ) &&
                    Offset == s.Offset;
            }

            if( s.IsPlane )
                return false;

            return
                Radius == s.Radius &&
                Center == s.Center /*&&
                Offset == s.Offset &&
                Invert == s.Invert*/;
        }