| Modifier and Type | Method and Description |
|---|---|
Vector2f |
Vector2f.add(Vector2f v)
Add
v to this vector. |
Vector2f |
Vector2f.fma(float a,
Vector2f b)
Add the component-wise multiplication of
a * b to this vector. |
Vector2f |
Vector2f.fma(float a,
Vector2f b,
Vector2f dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
Vector2f |
Vector2f.fma(Vector2f a,
Vector2f b)
Add the component-wise multiplication of
a * b to this vector. |
Vector2f |
Vector2f.fma(Vector2f a,
Vector2f b,
Vector2f dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
Vector2f |
Vector2f.lerp(Vector2f other,
float t)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in this. |
Vector2f |
Vector2f.lerp(Vector2f other,
float t,
Vector2f dest)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in dest. |
Vector2f |
Vector2f.mul(float scalar)
Multiply the components of this vector by the given scalar.
|
Vector2f |
Vector2f.mul(float scalar,
Vector2f dest)
Multiply the components of this vector by the given scalar and store the result in
dest. |
Vector2f |
Vector2f.mul(Matrix3f m)
Multiply this vector by the given matrix.
|
Vector2f |
Vector2f.mul(Matrix3f m,
Vector2f dest)
Multiply this vector by the given matrix and store the result in
dest. |
Vector2f |
Vector2f.negate()
Negate this vector.
|
Vector2f |
Vector2f.negate(Vector2f dest)
Negate this vector and store the result in
dest. |
Vector2f |
Vector2f.normalize()
Normalize this vector.
|
Vector2f |
Vector2f.normalize(Vector2f dest)
Normalize this vector and store the result in
dest. |
Vector2f |
Vector2f.perpendicular()
Set this vector to be one of its perpendicular vectors.
|
Vector2f |
Vector2f.set(ByteBuffer buffer)
Read this vector from the supplied
ByteBuffer at the current
buffer position. |
Vector2f |
Vector2f.set(float d)
Set the x and y components to the supplied value.
|
Vector2f |
Vector2f.set(FloatBuffer buffer)
Read this vector from the supplied
FloatBuffer at the current
buffer position. |
Vector2f |
Vector2f.set(float x,
float y)
Set the x and y components to the supplied values.
|
Vector2f |
Vector2f.set(int index,
ByteBuffer buffer)
Read this vector from the supplied
ByteBuffer starting at the specified
absolute buffer position/index. |
Vector2f |
Vector2f.set(int index,
FloatBuffer buffer)
Read this vector from the supplied
FloatBuffer starting at the specified
absolute buffer position/index. |
Vector2f |
Vector2f.set(Vector2f v)
Set this
Vector2f to the values of v. |
Vector2f |
Vector2f.sub(float x,
float y)
Subtract (x, y) from this vector.
|
Vector2f |
Vector2f.sub(Vector2f v)
Subtract
v from this vector. |
Vector2f |
Matrix3f.transform(Vector2f v,
Vector2f dest)
Transform the given vector by this matrix and store the result in
dest. |
Vector2f |
Vector2f.zero()
Set all components to zero.
|
| Modifier and Type | Method and Description |
|---|---|
Vector2f |
Vector2f.add(Vector2f v)
Add
v to this vector. |
static void |
Vector2f.add(Vector2f a,
Vector2f b,
Vector2f dest)
Add
a to b and store the result in dest. |
float |
Vector2f.angle(Vector2f v)
Return the angle between this vector and the supplied vector.
|
float |
Vector2f.distance(Vector2f v)
Return the distance between this and
v. |
float |
Vector2f.dot(Vector2f v)
Return the dot product of this vector and
v. |
Vector2f |
Vector2f.fma(float a,
Vector2f b)
Add the component-wise multiplication of
a * b to this vector. |
Vector2f |
Vector2f.fma(float a,
Vector2f b,
Vector2f dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
Vector2f |
Vector2f.fma(Vector2f a,
Vector2f b)
Add the component-wise multiplication of
a * b to this vector. |
Vector2f |
Vector2f.fma(Vector2f a,
Vector2f b,
Vector2f dest)
Add the component-wise multiplication of
a * b to this vector
and store the result in dest. |
Vector2f |
Vector2f.lerp(Vector2f other,
float t)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in this. |
Vector2f |
Vector2f.lerp(Vector2f other,
float t,
Vector2f dest)
Linearly interpolate
this and other using the given interpolation factor t
and store the result in dest. |
Vector2f |
Vector2f.mul(float scalar,
Vector2f dest)
Multiply the components of this vector by the given scalar and store the result in
dest. |
Vector2f |
Vector2f.mul(Matrix3f m,
Vector2f dest)
Multiply this vector by the given matrix and store the result in
dest. |
Vector2f |
Vector2f.negate(Vector2f dest)
Negate this vector and store the result in
dest. |
Vector2f |
Vector2f.normalize(Vector2f dest)
Normalize this vector and store the result in
dest. |
static void |
Vector2f.perpendicular(Vector2f v,
Vector2f dest)
Store one perpendicular vector of
v in dest. |
Matrix3f |
Matrix3f.rotateTo(Vector2f fromDir,
Vector2f toDir)
Apply a rotation transformation to this matrix that rotates the given normalized
fromDir direction vector
to point along the normalized toDir. |
Matrix3f |
Matrix3f.rotateTo(Vector2f fromDir,
Vector2f toDir,
Matrix3f dest)
Apply a rotation transformation to this matrix that rotates the given normalized
fromDir direction vector
to point along the normalized toDir, and store the result in dest. |
Vector2f |
Vector2f.set(Vector2f v)
Set this
Vector2f to the values of v. |
Matrix3f |
Matrix3f.setTranslation(Vector2f offset)
Set only the translation components of this matrix (m20, m21) to the given values (offset.x, offset.y).
|
Vector2f |
Vector2f.sub(Vector2f v)
Subtract
v from this vector. |
static void |
Vector2f.sub(Vector2f a,
Vector2f b,
Vector2f dest)
Subtract
b from a and store the result in dest. |
Matrix3f |
Matrix3f.transform(Vector2f v)
Transform the given vector by this matrix.
|
Vector2f |
Matrix3f.transform(Vector2f v,
Vector2f dest)
Transform the given vector by this matrix and store the result in
dest. |
Matrix3f |
Matrix3f.translate(Vector2f offset)
Apply a translation to this matrix by translating by the given number of units in x and y.
|
Matrix3f |
Matrix3f.translate(Vector2f offset,
Matrix3f dest)
Apply a translation to this matrix by translating by the given number of units in x and y, and
store the result in
dest. |
Matrix3f |
Matrix3f.translation(Vector2f offset)
Set this matrix to be a simple translation matrix in a two-dimensional coordinate system.
|
| Constructor and Description |
|---|
Vector2f(Vector2f v)
Create a new
Vector2f and initialize its components to the one of the given vector. |
Copyright © 2015 JOML. All rights reserved.