Package zombie.iso
Class Vector2
java.lang.Object
zombie.iso.Vector2
- All Implemented Interfaces:
java.lang.Cloneable
public final class Vector2
extends java.lang.Object
implements java.lang.Cloneable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vector2
add(Vector2 vector2)
static Vector2
addScaled(Vector2 vector2, Vector2 vector22, float float1, Vector2 vector23)
Vector2
aimAt(Vector2 vector2)
float
angleTo(Vector2 vector2)
Vector2
clone()
float
distanceTo(Vector2 vector2)
static float
dot(float float1, float float2, float float3, float float4)
float
dot(Vector2 vector2)
boolean
equals(java.lang.Object object)
static Vector2
fromAwtPoint(java.awt.Point point)
static Vector2
fromLengthDirection(float float1, float float2)
float
getDirection()
static float
getDirection(float float1, float float2)
float
getDirectionNeg()
Deprecated.float
getLength()
float
getLengthSquared()
float
getX()
float
getY()
float
normalize()
void
rotate(float float1)
void
scale(float float1)
static Vector2
scale(Vector2 vector2, float float1)
Vector2
set(float float1, float float2)
Vector2
set(Vector2 vector2)
Vector2
setDirection(float float1)
Vector2
setLength(float float1)
Vector2
setLengthAndDirection(float float1, float float2)
void
setX(float float1)
void
setY(float float1)
void
tangent()
java.awt.Dimension
toAwtDimension()
java.awt.Point
toAwtPoint()
java.lang.String
toString()
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
clone
- Overrides:
clone
in classjava.lang.Object
-
distanceTo
-
dot
-
equals
public boolean equals(java.lang.Object object)- Overrides:
equals
in classjava.lang.Object
-
getDirection
public float getDirection() -
getDirection
public static float getDirection(float float1, float float2) -
getDirectionNeg
@Deprecated public float getDirectionNeg()Deprecated. -
setDirection
-
getLength
public float getLength() -
getLengthSquared
public float getLengthSquared() -
setLength
-
normalize
public float normalize() -
set
-
set
-
setLengthAndDirection
-
toAwtDimension
public java.awt.Dimension toAwtDimension() -
toAwtPoint
public java.awt.Point toAwtPoint() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
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
-