public final class Vector
extends java.lang.Object
Constructor and Description |
---|
Vector(float x,
float y) |
Modifier and Type | Method and Description |
---|---|
float |
getX()
Returns the x magnitude.
|
float |
getY()
Returns the y magnitude.
|
Vector |
scale(float sxy)
Returns a new vector scaled by both x and y.
|
java.lang.String |
toString() |
public float getX()
public float getY()
public Vector scale(float sxy)
sxy
- x and y scalepublic java.lang.String toString()
toString
in class java.lang.Object