annotate src/IDMPoint.java @ 161:fb33d3796942

Rename source directory.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Jun 2016 12:53:53 +0300
parents game/IDMPoint.java@d6d92845d6a2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
73
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Ristipolku IDM point
151
d6d92845d6a2 ISO-8859-1 -> UTF-8.
Matti Hamalainen <ccr@tnsp.org>
parents: 134
diff changeset
3 * (C) Copyright 2011 Matti 'ccr' Hämäläinen <ccr@tnsp.org>
73
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 */
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 package game;
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 public class IDMPoint
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 {
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 public float x, y;
134
4c0dec72e2f0 Whitespace cosmetic cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 126
diff changeset
10
73
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 public IDMPoint(float x, float y)
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 {
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 this.x = x;
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 this.y = y;
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 }
79
83a79d1698c8 Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
16
126
c4d0ceec99ef Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents: 79
diff changeset
17 public IDMPoint(IDMPoint pt)
c4d0ceec99ef Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents: 79
diff changeset
18 {
c4d0ceec99ef Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents: 79
diff changeset
19 this.x = pt.x;
c4d0ceec99ef Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents: 79
diff changeset
20 this.y = pt.y;
c4d0ceec99ef Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents: 79
diff changeset
21 }
c4d0ceec99ef Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents: 79
diff changeset
22
79
83a79d1698c8 Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
23 public IDMPoint copy()
83a79d1698c8 Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
24 {
83a79d1698c8 Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
25 return new IDMPoint(x, y);
83a79d1698c8 Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
26 }
73
8c81a3e73a2b Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 }