public class Coord extends Object
Constructor and Description |
---|
Coord()
Create a coordinate set to
(0.0, 0.0) by default. |
Coord(double x,
double y)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getX()
Get the horizontal location.
|
double |
getY()
Get the vertical location.
|
void |
set(double x,
double y)
Set the new coordinate.
|
void |
setX(double x)
Set the new horizontal location.
|
void |
setY(double y)
Set the new vertical location.
|
void |
translate(double vx,
double vy)
Translate coordinate using specified values.
|
public Coord()
(0.0, 0.0)
by default.public Coord(double x, double y)
x
- The horizontal location.y
- The vertical location.public void translate(double vx, double vy)
vx
- The horizontal force.vy
- The vertical force.public void set(double x, double y)
x
- The new horizontal location.y
- The new vertical location.public void setX(double x)
x
- The new horizontal location.public void setY(double y)
y
- The new vertical location.public double getX()
public double getY()
Copyright © 2014 Byron 3D Games Studio. All rights reserved.