/// <summary> /// Compare an IFCFuzzyXYZ with an XYZ value by checking that their individual X,Y, and Z components are within an epsilon value of each other. /// </summary> /// <param name="obj">The other value, an XYZ or IFCFuzzyXYZ.</param> /// <returns>0 if they are equal, -1 if this is smaller than obj, and 1 if this is larger than obj.</returns> public int CompareTo(Object obj) { if (obj == null || (!(obj is XYZ))) { return(1); } double tol = (CustomTolerance != null) ? CustomTolerance.Value : IFCFuzzyXYZEpsilon; return(IFCXYZFuzzyCompare.Compare(this, obj as XYZ, tol)); }
/// <summary> /// The Compare function. /// </summary> /// <param name="first">The first XYZ value.</param> /// <param name="second">The second XYZ value.</param> /// <returns>-1 if first < second, 1 if second < first, 0 otherwise.</returns> public int Compare(XYZ first, XYZ second) { return(IFCXYZFuzzyCompare.Compare(first, second, Tolerance)); }