altoslib: Fix a couple of unit functions to make them public
authorKeith Packard <keithp@keithp.com>
Sun, 10 Feb 2013 08:32:26 +0000 (00:32 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 10 Feb 2013 08:32:26 +0000 (00:32 -0800)
Nice to be able to use these outside of altoslib

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosAccel.java
altoslib/AltosDistance.java
altoslib/AltosSpeed.java

index af8c36b9f2a9db7e69ff80ce54f51d8cbb25560f..d02b32385f348e1dfdf28eabb5afd1219dbcf07b 100644 (file)
@@ -37,7 +37,7 @@ public class AltosAccel extends AltosUnits {
                return "meters per second squared";
        }
 
-       int show_fraction(int width) {
+       public int show_fraction(int width) {
                return width / 9;
        }
 }
\ No newline at end of file
index 9d98f6b6c83ab2a178065f7b0010e48837c24269..25028ac79a2ae255717c901ef41f0460dbdca71c 100644 (file)
@@ -37,13 +37,13 @@ public class AltosDistance extends AltosUnits {
                return "meters";
        }
 
-       int show_fraction(int width) {
+       public int show_fraction(int width) {
                if (AltosConvert.imperial_units)
                        return width / 3;
                return width / 9;
        }
 
-       int say_fraction() {
+       public int say_fraction() {
                if (AltosConvert.imperial_units)
                        return 1;
                return 0;
index 020c137708c19f70c4e61d4f98ba24f0332ea04f..6fb624fb664bbab32511848765e54dccb566f77a 100644 (file)
@@ -37,7 +37,7 @@ public class AltosSpeed extends AltosUnits {
                return "meters per second";
        }
 
-       int show_fraction(int width) {
+       public int show_fraction(int width) {
                return width / 9;
        }
 }
\ No newline at end of file