Merge remote-tracking branch 'origin/master'
[fw/altos] / altoslib / AltosHeight.java
index e0fef5f6023f37b1933be1754e872eebbdbe6a55..96f5722bde80bcca8b3a33d32b3d32b345d2acd4 100644 (file)
@@ -25,6 +25,13 @@ public class AltosHeight extends AltosUnits {
                return v;
        }
 
+       public double parse(String s) throws NumberFormatException {
+               double  v = Double.parseDouble(s);
+               if (AltosConvert.imperial_units)
+                       v = AltosConvert.feet_to_meters(v);
+               return v;
+       }
+
        public String show_units() {
                if (AltosConvert.imperial_units)
                        return "ft";
@@ -37,7 +44,7 @@ public class AltosHeight extends AltosUnits {
                return "meters";
        }
 
-       int show_fraction(int width) {
+       public int show_fraction(int width) {
                return width / 9;
        }
 }
\ No newline at end of file