All Known Implementing Classes:
IntervalTree.Node, Segment

public interface Interval
A 1-dimensional interval represented using double-precision floating-point coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    contains(double point)
    Checks whether or not this interval contains the given point.
    default double
     
    double
    max()
     
    double
    min()
     
    static Interval
    of(double v0, double v1)
     
  • Method Details

    • of

      static Interval of(double v0, double v1)
    • min

      double min()
      Returns:
      the minimum coordinate
    • max

      double max()
      Returns:
      the maximum coordinate
    • length

      default double length()
      Returns:
      the length of this interval
    • contains

      default boolean contains(double point)
      Checks whether or not this interval contains the given point.
      Parameters:
      point - the point
      Returns:
      whether or not this interval contains the given point