FVector2D
struct FVector2D
A vector in 2D space composed of components (X, Y) with floating point precision.
A point or direction FVector in 2d space. The full C++ class is located here: Engine\Source\Runtime\Core\Public\Math\Vector2D.h
Name  Description  

float 
X 
Vector's X component. 

float 
Y 
Vector's Y component. 
Name  Description  

FVector2D() 
Default constructor (no initialization). 

FVector2D ( 
Constructs a vector from an FIntPoint . 

FVector2D ( 
Constructor which initializes all components to zero. 

FVector2D ( 
Constructor that does not initialize. More explicit than the default constructor. 

FVector2D ( 
Constructs a vector from an FVector . 

FVector2D ( 
Constructor using initial values for each component. 
Name  Description  

ClampAxes ( 
Creates a copy of this vector with both axes clamped to the given range. 

float 
Component ( 
Gets a specific component of the vector. Copy of the specified component. 

float & 
Component ( 
Gets a specific component of the vector. Reference to the specified component. 

bool 
ContainsNaN() 
Utility to check if there are any nonfinite values (NaN or Inf) in this vector. 


float 
CrossProduct 
Calculate the cross product of two vectors. The cross product. 
void 
DiagnosticCheckNaN() 


float 
Distance 
Distance between two 2D points. The distance between two 2D points. 

float 
DistSquared 
Squared distance between two 2D points. The squared distance between two 2D points. 

float 
DotProduct 
Calculates the dot product of two vectors. The dot product. 
bool 
Equals ( 
Checks for equality with errortolerant comparison. 

GetAbs() 
Get a copy of this vector with absolute value of each component. 

float 
GetAbsMax() 
Get the maximum absolute value of the vector's components. 

float 
GetMax() 
Get the maximum value of the vector's components. The maximum value of the vector's components. 

float 
GetMin() 
Get the minimum value of the vector's components. The minimum value of the vector's components. 

GetRotated ( 
Rotates around axis (0,0,1) Rotated Vector 

GetSafeNormal ( 
Gets a normalized copy of the vector, checking it is safe to do so based on the length. 

GetSignVector() 
Get a copy of the vector as sign only. 

bool 
InitFromString ( 
Initialize this Vector based on an FString . 

IntPoint() 
Get this vector as an Int Point. New Int Point from this vector. 

bool 
IsNearlyZero ( 
Checks whether vector is near to zero within a specified tolerance. 

bool 
IsZero() 
Checks whether all components of the vector are exactly zero. 

[CORE_API](API\Runtime\Core\Misc\CORE_API_1) boo... 
NetSerialize ( 
Network serialization function. 

void 
Normalize ( 
Normalize this vector inplace if it is large enough, set it to (0,0) otherwise. 

RoundToVector() 
Get this vector as a vector where each component has been rounded to the nearest int. 

bool 
Serialize ( 

bool 
Serialize ( 

void 
Set ( 
Set the values of the vector directly. 

float 
Size() 
Get the length (magnitude) of this vector. The length of this vector. 

float 
SizeSquared() 
Get the squared length of this vector. The squared length of this vector. 

SphericalToUnitCartesian() 
Converts spherical coordinates on the unit sphere into a Cartesian unit length vector. 

void 
ToDirectionAndLength ( 
Util to convert this vector into a unit direction vector and its original length. 

ToString() 
Get a textual representation of the vector. Text describing the vector. 
Name  Description  

operator ( 
Gets the result of subtracting a vector from this one. The result of the subtraction. 

operator() 
Gets a negated copy of the vector. A negated copy of the vector. 

operator ( 
Gets the result of subtracting A from each component of the vector. 

bool 
operator!= ( 
Compares this vector against another for inequality. 

operator* ( 
Gets the result of scaling the vector (multiplying each component by a value). 

operator* ( 
Gets the result of componentwise multiplication of this vector by another. 

operator*= ( 
Multiplies this vector with another vector, using componentwise multiplication. 

operator*= ( 
Scales this vector. Copy of the vector after scaling. 

operator/ ( 
Gets the result of componentwise division of this vector by another. 

operator/ ( 
Gets the result of dividing each component of the vector by a value. 

operator/= ( 
Divides this vector. Copy of the vector after division. 

operator/= ( 
Divides this vector by another vector, using componentwise division. 

float & 
operator[] ( 
Gets specific component of the vector. reference to component. 

float 
operator[] ( 
Gets specific component of the vector. copy of component value. 

float 
operator^ ( 
Calculates cross product of this vector and another. The cross product. 

float 
operator ( 
Calculates dot product of this vector and another. The dot product. 

operator+ ( 
Gets the result of adding two vectors together. The result of adding the vectors together. 

operator+ ( 
Gets the result of adding A to each component of the vector. 

operator+= ( 
Adds another vector to this. Copy of the vector after addition. 

bool 
operator< ( 
Checks whether both components of this vector are less than another. 

bool 
operator<= ( 
Checks whether both components of this vector are less than or equal to another. 

operator= ( 
Subtracts another vector from this. Copy of the vector after subtraction. 

bool 
operator== ( 
Compares this vector against another for equality. 

bool 
operator> ( 
Checks whether both components of this vector are greater than another. 

bool 
operator>= ( 
Checks whether both components of this vector are greater than or equal to another. 
Name 
Description 

UnitVector 
Global 2D unit vector constant (1,1) 
ZeroVector 
Global 2D zero vector constant (0,0) 
Module 

Header 
Runtime/Core/Public/Math/Vector2D.h 