Check if range of limits is close to zero

S4ZeroRange(x, tol = 1000 * .Machine$double.eps)

# S4 method for numeric
S4ZeroRange(x, tol = 1000 * .Machine$double.eps)

# S4 method for Ranges
S4ZeroRange(x, tol = 1000 * .Machine$double.eps)

Arguments

x

An object representing a range

tol

A value specifying the tolerance.

Value

A logical of length 1: TRUE if the relative differences of the range are not distinguishable from 0.

Details

Defaults to the zero_range function.

Examples

S4ZeroRange(c(10, 10)) # TRUE
#> [1] TRUE
S4ZeroRange(c(10, 11)) # FALSE
#> [1] FALSE
S4ZeroRange(c(NA, 10)) # NA
#> [1] NA