public class Vec2
extends Object
-
Field Summary
Fields
static final com.mojang.serialization.Codec<Vec2>
final float
final float
-
Constructor Summary
Constructors
-
Method Summary
float
float
boolean
float
float
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ZERO
public static final Vec2 ZERO
-
ONE
public static final Vec2 ONE
-
UNIT_X
public static final Vec2 UNIT_X
-
NEG_UNIT_X
public static final Vec2 NEG_UNIT_X
-
UNIT_Y
public static final Vec2 UNIT_Y
-
NEG_UNIT_Y
public static final Vec2 NEG_UNIT_Y
-
MAX
public static final Vec2 MAX
-
MIN
public static final Vec2 MIN
-
CODEC
public static final com.mojang.serialization.Codec<Vec2> CODEC
-
-
-
Constructor Details
-
Vec2
public Vec2(float pX,
float pY)
-
Method Details
-
scale
public Vec2 scale(float pFactor)
-
dot
public float dot(Vec2 pOther)
-
-
add
public Vec2 add(float pValue)
-
equals
public boolean equals(Vec2 pOther)
-
-
length
public float length()
-
lengthSquared
public float lengthSquared()
-
distanceToSqr
public float distanceToSqr(Vec2 pOther)
-