public final class Vector
extends Object
A 2D vector.
- Author:
- John Hewson
-
Constructor Summary
Constructors
-
Method Summary
float
float
Returns a new vector scaled by both x and y.
-
Constructor Details
-
Vector
public Vector(float x,
float y)
-
Method Details
-
getX
public float getX()
Returns the x magnitude.
-
getY
public float getY()
Returns the y magnitude.
-
scale
public Vector scale(float sxy)
Returns a new vector scaled by both x and y.
- Parameters:
sxy
- x and y scale
-