diff options
author | Keith Packard <keithp@keithp.com> | 2015-05-26 19:47:04 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-05-26 19:47:04 -0700 |
commit | 7975d088a4ac44c0943134fa41d0e3b88f50b98f (patch) | |
tree | a4213f36420604ee6ff11ff348d53cc28d81ec07 /altoslib/AltosPointInt.java | |
parent | f822b84d8c25159ff113fef6a419b6e18e87a87a (diff) |
altosdroid: Add offline map tab
It's not very fancy yet, but it does zoom and pan, and show the path
of the rocket with a line.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosPointInt.java')
-rw-r--r-- | altoslib/AltosPointInt.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/altoslib/AltosPointInt.java b/altoslib/AltosPointInt.java index e133ae9c..5d884391 100644 --- a/altoslib/AltosPointInt.java +++ b/altoslib/AltosPointInt.java @@ -28,4 +28,14 @@ public class AltosPointInt { this.x = x; this.y = y; } + + public AltosPointInt(double x, double y) { + this.x = (int) (x + 0.5); + this.y = (int) (y + 0.5); + } + + public AltosPointInt(AltosPointDouble pt_d) { + this.x = (int) (pt_d.x + 0.5); + this.y = (int) (pt_d.y + 0.5); + } } |