Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1256

Interval class upper and lower check

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0, 3.6
    • Labels:
      None

      Description

      In class Interval, which is in the package org.apache.commons.math4.geometry.euclidean.oned it is possible to pass the value for variable upper less than the value of variable lower, which is logically incorrect and also causes the method getSize() to return negative value.

      For example:

      @Test
      public void test1() throws Throwable

      { Interval interval0 = new Interval(0.0, (-1.0)); double double0 = interval0.getSize(); assertEquals((-1.0), double0, 0.01D); }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gjahanagirova Gunel Jahangirova
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: