Class Vector2f
Inheritance
java.lang.Object
Vector2f
Syntax
Constructors
Vector2f(float x, float y)
Declaration
public Vector2f(float x, float y)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
Fields
x
Declaration
Field Value
y
Declaration
Field Value
Methods
abs()
Declaration
Returns
add(float r)
Declaration
public Vector2f add(float r)
Parameters
Type |
Name |
Description |
float |
r |
|
Returns
add(Vector2f r)
Declaration
public Vector2f add(Vector2f r)
Parameters
Returns
angle(Vector2f v)
Declaration
public float angle(Vector2f v)
Parameters
Returns
ceil()
Declaration
Returns
ceil(Vector2f dest)
Declaration
public Vector2f ceil(Vector2f dest)
Parameters
Returns
cross(Vector3f r)
Declaration
public float cross(Vector3f r)
Parameters
Returns
distance(float x, float y)
Declaration
public float distance(float x, float y)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
Returns
distance(float x1, float y1, float x2, float y2)
Declaration
public static float distance(float x1, float y1, float x2, float y2)
Parameters
Type |
Name |
Description |
float |
x1 |
|
float |
y1 |
|
float |
x2 |
|
float |
y2 |
|
Returns
distance(Vector2f v)
Declaration
public float distance(Vector2f v)
Parameters
Returns
distanceSquared(float x, float y)
Declaration
public float distanceSquared(float x, float y)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
Returns
distanceSquared(float x1, float y1, float x2, float y2)
Declaration
public static float distanceSquared(float x1, float y1, float x2, float y2)
Parameters
Type |
Name |
Description |
float |
x1 |
|
float |
y1 |
|
float |
x2 |
|
float |
y2 |
|
Returns
distanceSquared(Vector2f v)
Declaration
public float distanceSquared(Vector2f v)
Parameters
Returns
div(float r)
Declaration
public Vector2f div(float r)
Parameters
Type |
Name |
Description |
float |
r |
|
Returns
div(Vector2f r)
Declaration
public Vector2f div(Vector2f r)
Parameters
Returns
dot(Vector2f r)
Declaration
public float dot(Vector2f r)
Parameters
Returns
equals(Vector2f r)
Declaration
public boolean equals(Vector2f r)
Parameters
Returns
floor()
Declaration
Returns
floor(Vector2f dest)
Declaration
public Vector2f floor(Vector2f dest)
Parameters
Returns
fma(float a, Vector2f b)
Declaration
public Vector2f fma(float a, Vector2f b)
Parameters
Type |
Name |
Description |
float |
a |
|
Vector2f |
b |
|
Returns
fma(float a, Vector2f b, Vector2f dest)
Declaration
public Vector2f fma(float a, Vector2f b, Vector2f dest)
Parameters
Returns
fma(Vector2f a, Vector2f b)
Declaration
public Vector2f fma(Vector2f a, Vector2f b)
Parameters
Returns
fma(Vector2f a, Vector2f b, Vector2f dest)
Declaration
public Vector2f fma(Vector2f a, Vector2f b, Vector2f dest)
Parameters
Returns
hashCode()
Declaration
Returns
isFinite()
Declaration
public boolean isFinite()
Returns
length()
Declaration
Returns
lerp(Vector2f dest, float lerpFactor)
Declaration
public Vector2f lerp(Vector2f dest, float lerpFactor)
Parameters
Type |
Name |
Description |
Vector2f |
dest |
|
float |
lerpFactor |
|
Returns
max()
Declaration
Returns
max(Vector2f v)
Declaration
public Vector2f max(Vector2f v)
Parameters
Returns
max(Vector2f v, Vector2f dest)
Declaration
public Vector2f max(Vector2f v, Vector2f dest)
Parameters
Returns
maxComponent()
Declaration
public int maxComponent()
Returns
min(Vector2f v)
Declaration
public Vector2f min(Vector2f v)
Parameters
Returns
min(Vector2f v, Vector2f dest)
Declaration
public Vector2f min(Vector2f v, Vector2f dest)
Parameters
Returns
minComponent()
Declaration
public int minComponent()
Returns
mul(float r)
Declaration
public Vector2f mul(float r)
Parameters
Type |
Name |
Description |
float |
r |
|
Returns
mul(Vector2f r)
Declaration
public Vector2f mul(Vector2f r)
Parameters
Returns
negate()
Declaration
Returns
negate(Vector2f dest)
Declaration
public Vector2f negate(Vector2f dest)
Parameters
Returns
normalize()
Declaration
public Vector2f normalize()
Returns
rotate(float angle)
Declaration
public Vector2f rotate(float angle)
Parameters
Type |
Name |
Description |
float |
angle |
|
Returns
round()
Declaration
Returns
round(Vector2f dest)
Declaration
public Vector2f round(Vector2f dest)
Parameters
Returns
set(float x, float y)
Declaration
public Vector2f set(float x, float y)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
Returns
set(Vector2f other)
Declaration
public Vector2f set(Vector2f other)
Parameters
Returns
setX(float x)
Declaration
public void setX(float x)
Parameters
Type |
Name |
Description |
float |
x |
|
setY(float y)
Declaration
public void setY(float y)
Parameters
Type |
Name |
Description |
float |
y |
|
sub(float r)
Declaration
public Vector2f sub(float r)
Parameters
Type |
Name |
Description |
float |
r |
|
Returns
sub(Vector2f r)
Declaration
public Vector2f sub(Vector2f r)
Parameters
Returns
toString()
Declaration
Returns
x()
Declaration
Returns
y()
Declaration
Returns
zero()
Declaration
Returns