Macro inari::interval[][src]

macro_rules! interval {
    ($s : expr) => { ... };
    ($s : expr, exact) => { ... };
    ($a : expr, $b : expr) => { ... };
}
Expand description

Creates an Interval from f64 bounds or from a bare interval literal.

In case of a failure, it returns a Result<Interval> instead of an Interval.

If the construction is invalid, an Err with IntervalErrorKind::UndefinedOperation is returned. If it cannot determine whether the construction is valid or not, IntervalErrorKind::PossiblyUndefinedOperation is returned.

  • interval!(a, b)

    Creates an interval $[a, b]$, where a and b are f64 values.

    The conditions $a ≀ b$, $a < +∞$ and $b > -∞$ must be held.

  • interval!(s)

    Creates an interval from a bare interval literal. s must be a string slice (&str).

  • interval!(s, exact)

    Creates an interval $𝒙$ from the bare interval literal obtained by format!("{:x}", x). s must be a string slice (&str).

For creating a constant, the macro const_interval! should be preferred over this one.