Vector4
Contents
[
Hide
]Vector4 class
A vector with four components.
Properties
Name | Description |
---|---|
x | The x component. |
y | The y component. |
z | The z component. |
w | The w component. |
Methods
constructor
Name | Description |
---|---|
constructor() |
Result:
constructor_overload
Name | Description |
---|---|
constructor_overload(vec, w) | Initializes a new instance of the Vector4 struct. |
Parameters:
Name | Type | Description |
---|---|---|
vec | Vector3 | Vec. |
w | Number | The width. |
Result:
constructor_overload$2{#constructor_overload$2}
Name | Description |
---|---|
constructor_overload$2(vec) | Initializes a new instance of the Vector4 struct. |
Parameters:
Name | Type | Description |
---|---|---|
vec | Vector3 | Vec. |
Result:
constructor_overload$3{#constructor_overload$3}
Name | Description |
---|---|
constructor_overload$3(vec) | Initializes a new instance of the Vector4 struct. |
Parameters:
Name | Type | Description |
---|---|---|
vec | FVector4 | Vec. |
Result:
constructor_overload$4{#constructor_overload$4}
Name | Description |
---|---|
constructor_overload$4(x, y, z) | Initializes a new instance of the Vector4 struct. |
Parameters:
Name | Type | Description |
---|---|---|
x | Number | The x coordinate. |
y | Number | The y coordinate. |
z | Number | The z coordinate. |
Result:
constructor_overload$5{#constructor_overload$5}
Name | Description |
---|---|
constructor_overload$5(x, y, z, w) | Initializes a new instance of the Vector4 struct. |
Parameters:
Name | Type | Description |
---|---|---|
x | Number | The x coordinate. |
y | Number | The y coordinate. |
z | Number | The z coordinate. |
w | Number | The width. |
Result:
set
Name | Description |
---|---|
set(newX, newY, newZ) | Sets vector’s xyz components at a time, w will be set to 1 |
Parameters:
Name | Type | Description |
---|---|---|
newX | Number | New X component. |
newY | Number | New Y component. |
newZ | Number | New Z component. |
Result:
equals
Name | Description |
---|---|
equals(obj) | Check if two vectors are equal |
Parameters:
Name | Type | Description |
---|---|---|
ob | Object | null |
Result: boolean
hashCode
Name | Description |
---|---|
hashCode() | Gets the hash code of this vector |
Result: Number
set
Name | Description |
---|---|
set(newX, newY, newZ, newW) | Sets vector’s all components at a time |
Parameters:
Name | Type | Description |
---|---|---|
newX | Number | New X component. |
newY | Number | New Y component. |
newZ | Number | New Z component. |
newW | Number | New W component. |
Result: Number
toString
Name | Description |
---|---|
toString() | Returns a java.lang.String that represents the current Vector4. |
Result: String
compareTo
Name | Description |
---|---|
compareTo(other) | Compare current vector to another instance. |
Parameters:
Name | Type | Description |
---|---|---|
othe | Vector4 | null |
Result: Number