public class Coord extends Object implements Localizable
Constructor and Description |
---|
Coord()
Create a coord set at 0.0.
|
Coord(double x,
double y)
Create a coord.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
double |
getX()
Get the current horizontal location.
|
double |
getY()
Get the current vertical location.
|
int |
hashCode() |
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()
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()
Localizable
getX
in interface Localizable
public double getY()
Localizable
getY
in interface Localizable
Copyright © 2017 Byron 3D Games Studio. All rights reserved.