Package org.lwjglx.util.vector
Class Vector2f
java.lang.Object
org.lwjglx.util.vector.Vector
org.lwjglx.util.vector.Vector2f
- All Implemented Interfaces:
java.io.Serializable,ReadableVector,ReadableVector2f,WritableVector2f
public class Vector2f extends Vector implements java.io.Serializable, ReadableVector2f, WritableVector2f
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Vector2f()Vector2f(float float1, float float2)Vector2f(ReadableVector2f readableVector2f) -
Method Summary
Modifier and Type Method Description static Vector2fadd(Vector2f vector2f, Vector2f vector2f2, Vector2f vector2f3)static floatangle(Vector2f vector2f, Vector2f vector2f2)static floatdot(Vector2f vector2f, Vector2f vector2f2)floatgetX()floatgetY()floatlengthSquared()Vectorload(java.nio.FloatBuffer floatBuffer)Vectornegate()Vector2fnegate(Vector2f vector2f)Vector2fnormalise(Vector2f vector2f)Vectorscale(float float1)voidset(float float1, float float2)Vector2fset(ReadableVector2f readableVector2f)voidsetX(float float1)voidsetY(float float1)Vectorstore(java.nio.FloatBuffer floatBuffer)static Vector2fsub(Vector2f vector2f, Vector2f vector2f2, Vector2f vector2f3)java.lang.StringtoString()Vector2ftranslate(float float1, float float2)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.lwjglx.util.vector.ReadableVector
length
-
Field Details
-
x
public float x -
y
public float y
-
-
Constructor Details
-
Vector2f
public Vector2f() -
Vector2f
-
Vector2f
public Vector2f(float float1, float float2)
-
-
Method Details
-
set
public void set(float float1, float float2)- Specified by:
setin interfaceWritableVector2f
-
set
-
lengthSquared
public float lengthSquared()- Specified by:
lengthSquaredin interfaceReadableVector- Specified by:
lengthSquaredin classVector
-
translate
-
negate
-
negate
-
normalise
-
dot
-
angle
-
add
-
sub
-
store
- Specified by:
storein interfaceReadableVector- Specified by:
storein classVector
-
load
-
scale
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getX
public final float getX()- Specified by:
getXin interfaceReadableVector2f
-
getY
public final float getY()- Specified by:
getYin interfaceReadableVector2f
-
setX
public final void setX(float float1)- Specified by:
setXin interfaceWritableVector2f
-
setY
public final void setY(float float1)- Specified by:
setYin interfaceWritableVector2f
-