private static bool OtherZEquals(double value,
                                         ZDifferenceStrategyIntersectionPoints.IIntersectionPoint p)
        {
            var spatialReference = p.Point.SpatialReference;
            var zTolerance       = ((ISpatialReferenceTolerance)spatialReference).ZTolerance;

            return(Math.Abs(value - p.OtherZ) <= zTolerance);
        }
 private static bool Equals(
     double?x, double?y, double?z, double?otherZ,
     [NotNull] ZDifferenceStrategyIntersectionPoints.IIntersectionPoint p)
 {
     return((x == null || Equals(x, p.Point.X)) &&
            (y == null || Equals(y, p.Point.Y)) &&
            (z == null || Equals(z, p.Point.Z)) &&
            (otherZ == null || OtherZEquals(otherZ.Value, p)));
 }