Package zombie.iso
Class Vector2
java.lang.Object
zombie.iso.Vector2
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Vector2floatangleBetween(Vector2 vector2) floatclone()floatdistanceTo(Vector2 vector2) static floatdot(float float1, float float2, float float3, float float4) floatbooleanstatic Vector2fromAwtPoint(Point point) static Vector2fromLengthDirection(float float1, float float2) floatstatic floatgetDirection(float float1, float float2) floatDeprecated.floatfloatfloatgetX()floatgetY()floatvoidrotate(float float1) voidscale(float float1) static Vector2set(float float1, float float2) setDirection(float float1) setLength(float float1) setLengthAndDirection(float float1, float float2) voidsetX(float float1) voidsetY(float float1) voidtangent()toString()
-
Field Details
-
x
public float x -
y
public float y
-
-
Constructor Details
-
Vector2
public Vector2() -
Vector2
-
Vector2
public Vector2(float float1, float float2)
-
-
Method Details
-
fromAwtPoint
-
fromLengthDirection
-
dot
public static float dot(float float1, float float2, float float3, float float4) -
addScaled
-
rotate
public void rotate(float float1) -
add
-
aimAt
-
angleTo
-
angleBetween
-
clone
-
distanceTo
-
dot
-
equals
-
getDirection
public float getDirection() -
getDirection
public static float getDirection(float float1, float float2) -
getDirectionNeg
Deprecated. -
setDirection
-
getLength
public float getLength() -
getLengthSquared
public float getLengthSquared() -
setLength
-
normalize
public float normalize() -
set
-
set
-
setLengthAndDirection
-
toAwtDimension
-
toAwtPoint
-
toString
-
getX
public float getX() -
setX
public void setX(float float1) -
getY
public float getY() -
setY
public void setY(float float1) -
tangent
public void tangent() -
scale
public void scale(float float1) -
scale
-