public class Vector2f extends Object implements Vectorf, Comparable<Vector2f>, Serializable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
static Vector2f |
ONE |
static Vector2f |
UNIT_X |
static Vector2f |
UNIT_Y |
static Vector2f |
ZERO |
| Constructor and Description |
|---|
Vector2f() |
Vector2f(double x,
double y) |
Vector2f(float x,
float y) |
Vector2f(Vector2f v) |
Vector2f(Vector3f v) |
Vector2f(Vector4f v) |
Vector2f(VectorNf v) |
| Modifier and Type | Method and Description |
|---|---|
Vector2f |
abs() |
Vector2f |
add(double x,
double y) |
Vector2f |
add(float x,
float y) |
Vector2f |
add(Vector2f v) |
Vector2f |
ceil() |
Vector2f |
clone() |
int |
compareTo(Vector2f v) |
static Vector2f |
createDirectionDeg(double angle)
Gets the direction vector of a certain angle in degrees.
|
static Vector2f |
createDirectionDeg(float angle)
Gets the direction vector of a certain angle in degrees.
|
static Vector2f |
createDirectionRad(double angle)
Gets the direction vector of a certain angle in radians.
|
static Vector2f |
createDirectionRad(float angle)
Gets the direction vector of a certain angle in radians.
|
static Vector2f |
createRandomDirection(Random random)
Gets the direction vector of a random angle using the random specified.
|
float |
distance(double x,
double y) |
float |
distance(float x,
float y) |
float |
distance(Vector2f v) |
float |
distanceSquared(double x,
double y) |
float |
distanceSquared(float x,
float y) |
float |
distanceSquared(Vector2f v) |
Vector2f |
div(double a) |
Vector2f |
div(double x,
double y) |
Vector2f |
div(float a) |
Vector2f |
div(float x,
float y) |
Vector2f |
div(Vector2f v) |
float |
dot(double x,
double y) |
float |
dot(float x,
float y) |
float |
dot(Vector2f v) |
boolean |
equals(Object o) |
Vector2f |
floor() |
static Vector2f |
from(float n) |
static Vector2f |
from(float x,
float y) |
int |
getFloorX() |
int |
getFloorY() |
int |
getMaxAxis()
Return the axis with the maximum value.
|
int |
getMinAxis()
Return the axis with the minimal value.
|
float |
getX() |
float |
getY() |
int |
hashCode() |
float |
length() |
float |
lengthSquared() |
Vector2f |
max(double x,
double y) |
Vector2f |
max(float x,
float y) |
Vector2f |
max(Vector2f v) |
Vector2f |
min(double x,
double y) |
Vector2f |
min(float x,
float y) |
Vector2f |
min(Vector2f v) |
Vector2f |
mul(double a) |
Vector2f |
mul(double x,
double y) |
Vector2f |
mul(float a) |
Vector2f |
mul(float x,
float y) |
Vector2f |
mul(Vector2f v) |
Vector2f |
negate() |
Vector2f |
normalize() |
Vector2f |
pow(double pow) |
Vector2f |
pow(float power) |
Vector2f |
project(double x,
double y) |
Vector2f |
project(float x,
float y) |
Vector2f |
project(Vector2f v) |
Vector2f |
round() |
Vector2f |
sub(double x,
double y) |
Vector2f |
sub(float x,
float y) |
Vector2f |
sub(Vector2f v) |
float[] |
toArray() |
Vector2d |
toDouble() |
Vector2f |
toFloat() |
Vector2i |
toInt() |
Vector2l |
toLong() |
String |
toString() |
Vector3f |
toVector3() |
Vector3f |
toVector3(double z) |
Vector3f |
toVector3(float z) |
Vector4f |
toVector4() |
Vector4f |
toVector4(double z,
double w) |
Vector4f |
toVector4(float z,
float w) |
VectorNf |
toVectorN() |
public static final Vector2f ZERO
public static final Vector2f UNIT_X
public static final Vector2f UNIT_Y
public static final Vector2f ONE
public Vector2f()
public Vector2f(Vector2f v)
public Vector2f(Vector3f v)
public Vector2f(Vector4f v)
public Vector2f(VectorNf v)
public Vector2f(double x,
double y)
public Vector2f(float x,
float y)
public float getX()
public float getY()
public int getFloorX()
public int getFloorY()
public Vector2f add(double x, double y)
public Vector2f add(float x, float y)
public Vector2f sub(double x, double y)
public Vector2f sub(float x, float y)
public Vector2f mul(double a)
public Vector2f mul(double x, double y)
public Vector2f mul(float x, float y)
public Vector2f div(double a)
public Vector2f div(double x, double y)
public Vector2f div(float x, float y)
public float dot(Vector2f v)
public float dot(double x,
double y)
public float dot(float x,
float y)
public Vector2f project(double x, double y)
public Vector2f project(float x, float y)
public Vector2f pow(double pow)
public Vector2f min(double x, double y)
public Vector2f min(float x, float y)
public Vector2f max(double x, double y)
public Vector2f max(float x, float y)
public float distanceSquared(Vector2f v)
public float distanceSquared(double x,
double y)
public float distanceSquared(float x,
float y)
public float distance(Vector2f v)
public float distance(double x,
double y)
public float distance(float x,
float y)
public float lengthSquared()
lengthSquared in interface Vectorfpublic int getMinAxis()
getMinAxis in interface Vectorfint axis with minimal valuepublic int getMaxAxis()
getMaxAxis in interface Vectorfint axis with maximum valuepublic Vector3f toVector3()
public Vector3f toVector3(double z)
public Vector3f toVector3(float z)
public Vector4f toVector4()
public Vector4f toVector4(double z, double w)
public Vector4f toVector4(float z, float w)
public VectorNf toVectorN()
public int compareTo(Vector2f v)
compareTo in interface Comparable<Vector2f>public static Vector2f from(float n)
public static Vector2f from(float x, float y)
public static Vector2f createRandomDirection(Random random)
random - to usepublic static Vector2f createDirectionDeg(double angle)
angle - in degreespublic static Vector2f createDirectionDeg(float angle)
angle - in degreespublic static Vector2f createDirectionRad(double angle)
angle - in radianspublic static Vector2f createDirectionRad(float angle)
angle - in radiansCopyright © 2013–2016 Flow Powered. All rights reserved.