public final class FVector2 extends java.lang.Object implements java.lang.Comparable<FVector2>, Struct<FVector2>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
float |
x
The x component.
|
float |
y
The y component.
|
| Constructor and Description |
|---|
FVector2() |
FVector2(float x,
float y)
Initializes a new instance of the
FVector2. |
FVector2(FVector3 vec)
Initializes a new instance of the
FVector2. |
FVector2(Vector2 vec)
Initializes a new instance of the
FVector2. |
| Modifier and Type | Method and Description |
|---|---|
static FVector2 |
add(FVector2 a,
FVector2 b)
+ Operator overloading
|
FVector2 |
clone()
Clone current instance
|
int |
compareTo(FVector2 other)
Compare current vector to another instance.
|
void |
copyFrom(FVector2 src)
Copy internal state from argument t
|
static Vector2 |
create(FVector2 v)
Explicit conversion operator to cast FVector2 to Vector2
|
boolean |
equals(FVector2 rhs)
Check if two vectors are equal
|
boolean |
equals(java.lang.Object obj)
Check if two vectors are equal
|
int |
hashCode()
Gets the hash code of this instance
|
static FVector2 |
mul(FVector2 a,
float b)
* operator overloading
|
static boolean |
op_eq(FVector2 a,
FVector2 b)
== Operator overloading
|
static boolean |
op_ne(FVector2 a,
FVector2 b)
!= Operator overloading
|
static FVector2 |
sub(FVector2 a,
FVector2 b)
- Operator overloading
|
java.lang.String |
toString()
Returns a string that represents the
FVector2 |
public FVector2(float x,
float y)
FVector2.x - X component of the vectory - Y component of the vectorpublic FVector2(FVector3 vec)
FVector2.vec - Vector2 in double typepublic FVector2(Vector2 vec)
FVector2.vec - Vector2 in double typepublic FVector2()
public static Vector2 create(FVector2 v)
v - Vector 2 in float type.public int compareTo(FVector2 other)
compareTo in interface java.lang.Comparable<FVector2>public java.lang.String toString()
FVector2toString in class java.lang.Objectpublic static FVector2 add(FVector2 a, FVector2 b)
a - First vectorb - Second vectorpublic static FVector2 sub(FVector2 a, FVector2 b)
a - First vectorb - Second vectorpublic static FVector2 mul(FVector2 a, float b)
a - First vectorb - Second vectorpublic boolean equals(FVector2 rhs)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic static boolean op_eq(FVector2 a, FVector2 b)
a - First vectorb - Second vectorpublic static boolean op_ne(FVector2 a, FVector2 b)
a - First vectorb - Second vectorpublic void copyFrom(FVector2 src)
Structpublic int hashCode()
hashCode in class java.lang.Object