|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwiiremotej.AnalogStick
public class AnalogStick
Represents a simple XY analog stick. AnalogSticks are immutable.
| Constructor Summary | |
|---|---|
AnalogStick(double x,
double y)
Creates a new AnalogStick with the given X and Y values. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Returns true if the given object is the same as this AnalogStick; otherwise false. |
double |
getX()
Returns the X position of the analog stick, from -1 to 1. |
double |
getY()
Returns the Y position of the analog stick, from -1 to 1. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnalogStick(double x,
double y)
throws java.lang.IllegalArgumentException
x - the X position of the analog stick. Must be between -1 and 1.y - the Y position of the analog stick. Must be between -1 and 1.
java.lang.IllegalArgumentException - if x and y are not between -1 and 1.| Method Detail |
|---|
public double getX()
public double getY()
public boolean equals(java.lang.Object object)
true if the given object is the same as this AnalogStick; otherwise false. Both X and Y must match.
equals in class java.lang.Objectobject - the object to compare to for equality.
true if the given object is the same as this AnalogStick; otherwise false.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||