code: public static boolean isLinear(ListNumber listNumber) {
          if (listNumber instanceof LinearListDouble || listNumber instanceof LinearListDoubleFromRange) {
              return true;
          }
          ListDouble diff = ListMath.subtract(listNumber, linearListFromRange(listNumber.getDouble(0), listNumber.getDouble(listNumber.size() - 1), listNumber.size()));
          for (int i = 0; i < diff.size(); i++) {
              if (Math.abs(diff.getDouble(i)) > Math.ulp(listNumber.getDouble(i))) {
                  return false;
              }
          }
          return true;
      }
docs: Tests whether the list contains a equally spaced numbers.
  <p>
  Always returns true if the list was created with {@link #linearList(double, double, int) }
  or {@link #linearListFromRange(double, double, int) }. For all other cases,
  takes the first and last value, creates a linearListFromRange, and checks
  whether the difference is greater than the precision allowed by double.
  Note that this method is really strict, and it may rule out cases
  that may be considered to be linear.
  
  @param listNumber
  @return true if the elements of the list are equally spaced