Last change
on this file since 627 was 627, checked in by framm, 16 years ago |
|
-
Property svn:eol-style
set to
native
|
File size:
758 bytes
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.coor;
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Northern, Easting of the projected coordinates.
|
---|
6 | *
|
---|
7 | * This class is immutable.
|
---|
8 | *
|
---|
9 | * @author Imi
|
---|
10 | */
|
---|
11 | public class EastNorth extends Coordinate {
|
---|
12 |
|
---|
13 | public EastNorth(double east, double north) {
|
---|
14 | super(east,north);
|
---|
15 | }
|
---|
16 |
|
---|
17 | public double east() {
|
---|
18 | return x;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public double north() {
|
---|
22 | return y;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public EastNorth add(double dx, double dy) {
|
---|
26 | return new EastNorth(x+dx, y+dy);
|
---|
27 | }
|
---|
28 |
|
---|
29 | public EastNorth interpolate(EastNorth en2, double proportion) {
|
---|
30 | return new EastNorth(this.x + proportion * (en2.x - this.x),this.y + proportion * (en2.y - this.y));
|
---|
31 | }
|
---|
32 |
|
---|
33 | @Override public String toString() {
|
---|
34 | return "EastNorth[e="+x+", n="+y+"]";
|
---|
35 | }
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.