Radegast.Rendering.SceneObject.CompareTo C# (CSharp) Method

CompareTo() public method

Implementation of the IComparable interface used for sorting by distance
public CompareTo ( object other ) : int
other object Object we are comparing to
return int
        public virtual int CompareTo(object other)
        {
            SceneObject o = (SceneObject)other;
            if (this.DistanceSquared < o.DistanceSquared)
                return -1;
            else if (this.DistanceSquared > o.DistanceSquared)
                return 1;
            else
                return 0;
        }