]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/data/DoubleRange.java
Version 7, February 2009
[GpsPrune.git] / tim / prune / data / DoubleRange.java
index f241d4d13470eb1b5e1feb60cdab5d22b686d5b8..b6b8a8fb9cb9c7f1b647c9ef20d1d5779bbad16c 100644 (file)
@@ -10,6 +10,20 @@ public class DoubleRange
        private double _min = 0.0, _max = 0.0;
 
 
+       /** Empty constructor, cleared to zeroes */
+       public DoubleRange() {}
+
+       /**
+        * Constructor giving two initial values
+        * @param inValue1 first value
+        * @param inValue2 second value
+        */
+       public DoubleRange(double inValue1, double inValue2)
+       {
+               addValue(inValue1);
+               addValue(inValue2);
+       }
+
        /**
         * Clear for a new calculation
         */
@@ -57,4 +71,12 @@ public class DoubleRange
        {
                return _max;
        }
+
+       /**
+        * @return range, as maximum - minimum
+        */
+       public double getRange()
+       {
+               return _max - _min;
+       }
 }