 # UKismetMathLibrary

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UBlueprintFunctionLibrary UKismetMathLibrary

References

Syntax

class UKismetMathLibrary : public UBlueprintFunctionLibrary

Constructors

Name Description

UKismetMathLibrary

(
const FObjectInitializer& ObjectIn...
)

Functions

Name Description

float

Abs

(
float A
)

Returns the absolute (positive) value of A

int32

Abs_Int

(
int32 A
)

Returns the absolute (positive) value of A

int64

Abs_Int64

(
int64 A
)

Returns the absolute (positive) value of A

float

Acos

(
float A
)

Returns the inverse cosine (arccos) of A (result is in Radians)

uint8

(
uint8 A,
uint8 B
)

FDateTime

(
FDateTime A,
FDateTime B
)

FDateTime

(
FDateTime A,
FTimespan B
)

DateTime functions

float

(
float A,
float B
)

int64

(
int64 A,
int64 B
)

int32

(
int32 A,
int32 B
)

FIntPoint

(
FIntPoint A,
int32 B
)

Returns IntPoint A added by B

FIntPoint

(
FIntPoint A,
FIntPoint B
)

Returns IntPoint A added by B

FLinearColor

Element-wise addition of two linear colors (R+R, G+G, B+B, A+A)

FMatrix

(
const FMatrix& A,
const FMatrix& B
)

Gets the result of adding a matrix to this.

FQuat

(
const FQuat& A,
const FQuat& B
)

Returns addition of Vector A and Vector B (A + B)

FTimespan

(
FTimespan A,
FTimespan B
)

Timespan functions

FVector2D

(
FVector2D A,
float B
)

Returns Vector A added by B

FVector2D

(
FVector2D A,
FVector2D B
)

Returns addition of Vector A and Vector B (A + B)

FVector4

(
const FVector4& A,
const FVector4& B
)

Returns addition of Vector A and Vector B (A + B)

FVector

(
FVector A,
float B
)

Adds a float to each component of a vector

FVector

(
FVector A,
int32 B
)

Adds an integer to each component of a vector

FVector

(
FVector A,
FVector B
)

int64

And_Int64Int64

(
int64 A,
int64 B
)

Bitwise AND (A & B)

int32

And_IntInt

(
int32 A,
int32 B
)

Bitwise AND (A & B)

float

Asin

(
float A
)

Returns the inverse sine (arcsin) of A (result is in Radians)

float

Atan

(
float A
)

Returns the inverse tan (atan) (result is in Radians)

float

Atan2

(
float Y,
float X
)

Returns the inverse tan (atan2) of A/B (result is in Radians)

uint8

BMax

(
uint8 A,
uint8 B
)

Returns the maximum value of A and B

uint8

BMin

(
uint8 A,
uint8 B
)

Returns the minimum value of A and B

bool

BooleanAND

(
bool A,
bool B
)

Returns the logical AND of two values (A AND B)

bool

BooleanNAND

(
bool A,
bool B
)

Returns the logical NAND of two values (A AND B)

bool

BooleanNOR

(
bool A,
bool B
)

Returns the logical Not OR of two values (A NOR B)

bool

BooleanOR

(
bool A,
bool B
)

Returns the logical OR of two values (A OR B)

bool

BooleanXOR

(
bool A,
bool B
)

Returns the logical eXclusive OR of two values (A XOR B)

void

BreakColor

(
FLinearColor InColor,
float& R,
float& G,
float& B,
float& A
)

Breaks apart a color into individual RGB components (as well as alpha)

void

BreakDateTime

(
FDateTime InDateTime,
int32& Year,
int32& Month,
int32& Day,
int32& Hour,
int32& Minute,
int32& Second,
int32& Millisecond
)

Breaks a DateTime into its components

void

BreakFrameRate

(
const FFrameRate& InFrameRate,
int32& Numerator,
int32& Denominator
)

Breaks a FFrameRate into a numerator and denominator.

void

BreakQualifiedFrameTime

(
const FQualifiedFrameTime& InFrame...,
FFrameRate& FrameRate,
float& SubFrame
)

Breaks a FQualifiedFrameTime into its component parts again.

void

BreakRandomStream

(
const FRandomStream& InRandomStrea...,
int32& InitialSeed
)

Breaks apart a random number generator

void

BreakRotator

(
FRotator InRot,
float& Roll,
float& Pitch,
float& Yaw
)

Breaks apart a rotator into {Roll, Pitch, Yaw} angles in degrees

void

BreakRotIntoAxes

(
const FRotator& InRot,
FVector& X,
FVector& Y,
FVector& Z
)

Breaks apart a rotator into its component axes

void

BreakTimespan

(
FTimespan InTimespan,
int32& Days,
int32& Hours,
int32& Minutes,
int32& Seconds,
int32& Milliseconds
)

Breaks a Timespan into its components

void

BreakTimespan2

(
FTimespan InTimespan,
int32& Days,
int32& Hours,
int32& Minutes,
int32& Seconds,
int32& FractionNano
)

Breaks a Timespan into its components

void

BreakTransform

(
const FTransform& InTransform,
FVector& Location,
FRotator& Rotation,
FVector& Scale
)

Breaks apart a transform into location, rotation and scale

void

BreakVector

(
FVector InVec,
float& X,
float& Y,
float& Z
)

Breaks a vector apart into X, Y, Z

void

BreakVector2D

(
FVector2D InVec,
float& X,
float& Y
)

Breaks a 2D vector apart into X, Y.

void

BreakVector4

(
const FVector4& InVec,
float& X,
float& Y,
float& Z,
float& W
)

Breaks a 4D vector apart into X, Y, Z, W.

FLinearColor

CInterpTo

(
FLinearColor Current,
FLinearColor Target,
float DeltaTime,
float InterpSpeed
)

Interpolate Linear Color from Current to Target.

int32

Clamp

(
int32 Value,
int32 Min,
int32 Max
)

Returns Value clamped to be between A and B (inclusive)

float

ClampAngle

(
float AngleDegrees,
float MinAngleDegrees,
float MaxAngleDegrees
)

Clamps an arbitrary angle to be between the given angles. Will clamp to nearest boundary.

FVector2D

ClampAxes2D

(
FVector2D A,
float MinAxisVal,
float MaxAxisVal
)

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

float

ClampAxis

(
float Angle
)

Clamps an angle to the range of [0, 360].

int64

ClampInt64

(
int64 Value,
int64 Min,
int64 Max
)

Returns Value clamped to be between A and B (inclusive)

FVector

ClampVectorSize

(
FVector A,
float Min,
float Max
)

Create a copy of this vector, with its magnitude/size/length clamped between Min and Max.

bool

ClassIsChildOf

(
TSubclassOf< class UObject > TestCl...,
TSubclassOf< class UObject > Parent...
)

Determine if a class is a child of another class.

FRotator

ComposeRotators

(
FRotator A,
FRotator B
)

Combine 2 rotations to give you the resulting rotation of first applying A, then B.

FTransform

ComposeTransforms

(
const FTransform& A,
const FTransform& B
)

Compose two transforms in order: A * B.

uint8

Conv_BoolToByte

(
bool InBool
)

Converts a bool to a byte

float

Conv_BoolToFloat

(
bool InBool
)

Converts a bool to a float (0.0f or 1.0f)

int32

Conv_BoolToInt

(
bool InBool
)

Converts a bool to an int

float

Conv_ByteToFloat

(
uint8 InByte
)

Converts a byte to a float

K2 Utilities

int32

Conv_ByteToInt

(
uint8 InByte
)

Converts a byte to an integer

FLinearColor

Conv_ColorToLinearColor

(
FColor InColor
)

Converts a color to LinearColor

FLinearColor

Conv_FloatToLinearColor

(
float InFloat
)

Convert a float into a LinearColor, where each element is that float

FVector

Conv_FloatToVector

(
float InFloat
)

Convert a float into a vector, where each element is that float

uint8

Conv_Int64ToByte

(
int64 InInt
)

Converts a 64 bit integer to a byte (if the integer is too large, returns the low 8 bits)

int32

Conv_Int64ToInt

(
int64 InInt
)

Converts a 64 bit integer to a 32 bit integer (if the integer is too large, returns the low 32 bits)

FVector2D

Conv_IntPointToVector2D

(
FIntPoint InIntPoint
)

IntPoint functionsConvert an IntPoint to a Vector2D

bool

Conv_IntToBool

(
int32 InInt
)

Converts a int to a bool

uint8

Conv_IntToByte

(
int32 InInt
)

Converts an integer to a byte (if the integer is too large, returns the low 8 bits)

float

Conv_IntToFloat

(
int32 InInt
)

Converts an integer to a float

int64

Conv_IntToInt64

(
int32 InInt
)

Converts an integer to a 64 bit integer

FIntVector

Conv_IntToIntVector

(
int32 InInt
)

Converts an integer to an IntVector

FVector

Conv_IntVectorToVector

(
const FIntVector& InIntVector
)

Convert an IntVector to a vector

FColor

Conv_LinearColorToColor

(
FLinearColor InLinearColor,
bool InUseSRGB
)

Quantizes the linear color and returns the result as a FColor with optional sRGB conversion and quality as goal.

FVector

Conv_LinearColorToVector

(
FLinearColor InLinearColor
)

Converts a LinearColor to a vector

FRotator

Conv_MatrixToRotator

(
const FMatrix& InMatrix
)

Convert a Matrix to a Rotator (Assumes Matrix represents a transform)

FTransform

Conv_MatrixToTransform

(
const FMatrix& InMatrix
)

Matrix functions Convert a Matrix to a Transform (Assumes Matrix represents a transform)

FTransform

Conv_RotatorToTransform

(
const FRotator& InRotator
)

Convert Rotator to Transform

FVector

Conv_RotatorToVector

(
FRotator InRot
)

Get the X direction vector after this rotation

FMatrix

Conv_TransformToMatrix

(
const FTransform& Transform
)

Convert a Transform to a Matrix with scale

FIntPoint

Conv_Vector2DToIntPoint

(
FVector2D InVector2D
)

Convert a Vector2D to an IntPoint

FVector

Conv_Vector2DToVector

(
FVector2D InVector2D,
float Z
)

Convert a Vector2D to a Vector

FQuat

Conv_Vector4ToQuaterion

(
const FVector4& InVec
)

Return the Quaternion orientation corresponding to the direction in which the vector points.

FRotator

Conv_Vector4ToRotator

(
const FVector4& InVec
)

Return the FRotator orientation corresponding to the direction in which the vector points.

FVector

Conv_Vector4ToVector

(
const FVector4& InVector4
)

Convert a Vector4 to a Vector (dropping the W element)

FLinearColor

Conv_VectorToLinearColor

(
FVector InVec
)

Converts a vector to LinearColor

FQuat

Conv_VectorToQuaterion

(
FVector InVec
)

Return the Quaternion orientation corresponding to the direction in which the vector points.

FRotator

Conv_VectorToRotator

(
FVector InVec
)

Return the FRotator orientation corresponding to the direction in which the vector points.

FTransform

Conv_VectorToTransform

(
FVector InLocation
)

Convert a vector to a transform. Uses vector as location

FVector2D

Conv_VectorToVector2D

(
FVector InVector
)

Convert a Vector to a Vector2D using the Vector's (X, Y) coordinates

float

Cos

(
float A
)

Returns the cosine of A (expects Radians)

FVector

CreateVectorFromYawPitch

(
float Yaw,
float Pitch,
float Length
)

Creates a directional vector from rotation values {Pitch, Yaw} supplied in degrees with specified Length

FVector

Cross_VectorVector

(
FVector A,
FVector B
)

Returns the cross product of two 3d vectors - see http://mathworld.wolfram.com/CrossProduct.html

float

CrossProduct2D

(
FVector2D A,
FVector2D B
)

Returns the cross product of two 2d vectors - see http://mathworld.wolfram.com/CrossProduct.html

bool

DateTimeFromIsoString

(
FString IsoString,
FDateTime& Result
)

Converts a date string in ISO-8601 format to a DateTime object

bool

DateTimeFromString

(
FString DateTimeString,
FDateTime& Result
)

Converts a date string to a DateTime object

FDateTime

DateTimeMaxValue()

Returns the maximum date and time value

FDateTime

DateTimeMinValue()

Returns the minimum date and time value

int32

DaysInMonth

(
int32 Year,
int32 Month
)

Returns the number of days in the given year and month

int32

DaysInYear

(
int32 Year
)

Returns the number of days in the given year

float

DegAcos

(
float A
)

Returns the inverse cos (arccos) of A (result is in Degrees)

float

DegAsin

(
float A
)

Returns the inverse sin (arcsin) of A (result is in Degrees)

float

DegAtan

(
float A
)

Returns the inverse tan (atan) (result is in Degrees)

float

DegAtan2

(
float Y,
float X
)

Returns the inverse tan (atan2) of A/B (result is in Degrees)

float

DegCos

(
float A
)

Returns the cos of A (expects Degrees)

float

(
float A
)

Returns radians value based on the input degrees

float

DegSin

(
float A
)

Returns the sin of A (expects Degrees)

float

DegTan

(
float A
)

Returns the tan of A (expects Degrees)

float

Distance2D

(
FVector2D V1,
FVector2D V2
)

Distance between two 2D points.

float

DistanceSquared2D

(
FVector2D V1,
FVector2D V2
)

Squared distance between two 2D points.

uint8

Divide_ByteByte

(
uint8 A,
uint8 B
)

Division (A / B)

float

Divide_FloatFloat

(
float A,
float B
)

Division (A / B)

int64

Divide_Int64Int64

(
int64 A,
int64 B
)

Division (A / B)

int32

Divide_IntInt

(
int32 A,
int32 B
)

Division (A / B)

FIntPoint

Divide_IntPointInt

(
FIntPoint A,
int32 B
)

Returns IntPoint A divided by B

FIntPoint

Divide_IntPointIntPoint

(
FIntPoint A,
FIntPoint B
)

Returns IntPoint A divided by B

FLinearColor

Divide_LinearColorLinearColor

Element-wise multiplication of two linear colors (R/R, G/G, B/B, A/A)

FTimespan

Divide_TimespanFloat

(
FTimespan A,
float Scalar
)

Scalar division (A / s)

FVector2D

Divide_Vector2DFloat

(
FVector2D A,
float B
)

Returns Vector A divided by B

FVector2D

Divide_Vector2DVector2D

(
FVector2D A,
FVector2D B
)

Element-wise Vector divide (Result = {A.x/B.x, A.y/B.y})

FVector4

Divide_Vector4Vector4

(
const FVector4& A,
const FVector4& B
)

Element-wise Vector divide (Result = {A.x/B.x, A.y/B.y, A.z/B.z, A.w/B.w})

FVector

Divide_VectorFloat

(
FVector A,
float B
)

Vector divide by a float

FVector

Divide_VectorInt

(
FVector A,
int32 B
)

Vector divide by an integer

FVector

Divide_VectorVector

(
FVector A,
FVector B
)

Element-wise Vector division (Result = {A.x/B.x, A.y/B.y, A.z/B.z})

float

Dot_VectorVector

(
FVector A,
FVector B
)

Returns the dot product of two 3d vectors - see http://mathworld.wolfram.com/DotProduct.html

float

DotProduct2D

(
FVector2D A,
FVector2D B
)

Returns the dot product of two 2d vectors - see http://mathworld.wolfram.com/DotProduct.html

float

DynamicWeightedMovingAverage_Float

(
float CurrentSample,
float PreviousSample,
float MaxDistance,
float MinWeight,
float MaxWeight
)

Calculates the new value in a weighted moving average series using the previous value and a weight range.

FRotator

DynamicWeightedMovingAverage_FRotator

(
FRotator CurrentSample,
FRotator PreviousSample,
float MaxDistance,
float MinWeight,
float MaxWeight
)

Calculates the new value in a weighted moving average series using the previous value and a weight range.

FVector

DynamicWeightedMovingAverage_FVector

(
FVector CurrentSample,
FVector PreviousSample,
float MaxDistance,
float MinWeight,
float MaxWeight
)

Calculates the new value in a weighted moving average series using the previous value and a weight range.

float

Ease

(
float A,
float B,
float Alpha,
TEnumAsByte< EEasingFunc::Type > Ea...,
float BlendExp,
int32 Steps
)

Easeing between A and B using a specified easing function

bool

Equal_IntPointIntPoint

(
FIntPoint A,
FIntPoint B
)

Returns true if IntPoint A is equal to IntPoint B (A == B)

bool

EqualEqual_BoolBool

(
bool A,
bool B
)

Returns true if the values are equal (A == B)

bool

EqualEqual_ByteByte

(
uint8 A,
uint8 B
)

Returns true if A is equal to B (A == B)

bool

EqualEqual_ClassClass

(
UClass* A,
UClass* B
)

Class operators and functions.Returns true if A and B are equal (A == B)

bool

EqualEqual_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Returns true if the values are equal (A == B)

bool

EqualEqual_FloatFloat

(
float A,
float B
)

Returns true if A is exactly equal to B (A == B)

bool

EqualEqual_Int64Int64

(
int64 A,
int64 B
)

Returns true if A is equal to B (A == B)

bool

EqualEqual_IntInt

(
int32 A,
int32 B
)

Returns true if A is equal to B (A == B)

bool

EqualEqual_LinearColorLinearColor

Returns true if linear color A is equal to linear color B (A == B) within a specified error tolerance

bool

EqualEqual_MatrixMatrix

(
const FMatrix& A,
const FMatrix& B,
float Tolerance
)

Checks whether another Matrix is equal to this, within specified tolerance.

bool

EqualEqual_NameName

(
FName A,
FName B
)

Name operators.Returns true if A and B are equal (A == B)

bool

EqualEqual_ObjectObject

(
UObject* A,
UObject* B
)

Object operators and functions.Returns true if A and B are equal (A == B)

bool

EqualEqual_QuatQuat

(
const FQuat& A,
const FQuat& B,
float Tolerance
)

Quat functionsReturns true if Quaternion A is equal to Quaternion B (A == B) within a specified error tolerance

bool

EqualEqual_RotatorRotator

(
FRotator A,
FRotator B,
float ErrorTolerance
)

Returns true if rotator A is equal to rotator B (A == B) within a specified error tolerance

bool

EqualEqual_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Returns true if the values are equal (A == B)

bool

EqualEqual_TransformTransform

(
const FTransform& A,
const FTransform& B
)

Returns true if transform A is equal to transform B

bool

EqualEqual_Vector2DVector2D

(
FVector2D A,
FVector2D B,
float ErrorTolerance
)

Returns true if vector2D A is equal to vector2D B (A == B) within a specified error tolerance

bool

EqualEqual_Vector4Vector4

(
const FVector4& A,
const FVector4& B,
float ErrorTolerance
)

Returns true if vector A is equal to vector B (A == B) within a specified error tolerance

bool

EqualEqual_VectorVector

(
FVector A,
FVector B,
float ErrorTolerance
)

Returns true if vector A is equal to vector B (A == B) within a specified error tolerance

bool

EqualExactly_Vector2DVector2D

(
FVector2D A,
FVector2D B
)

Returns true if vector A is equal to vector B (A == B)

bool

EqualExactly_Vector4Vector4

(
const FVector4& A,
const FVector4& B
)

Returns true if vector A is equal to vector B (A == B)

bool

EqualExactly_VectorVector

(
FVector A,
FVector B
)

Returns true if vector A is equal to vector B (A == B)

float

Exp

(
float A
)

Returns exponential(e) to the power A (e^A)

int32

FCeil

(
float A
)

Rounds A up towards positive infinity / up to the next integer (e.g., -1.6 becomes -1 and 1.6 becomes 2)

int64

FCeil64

(
float A
)

Rounds A up towards positive infinity / up to the next integer (e.g., -1.6 becomes -1 and 1.6 becomes 2)

float

FClamp

(
float Value,
float Min,
float Max
)

Returns Value clamped between A and B (inclusive)

int32

FFloor

(
float A
)

Rounds A down towards negative infinity / down to the previous integer (e.g., -1.6 becomes -2 and 1.6 becomes 1)

int64

FFloor64

(
float A
)

Rounds A down towards negative infinity / down to the previous integer (e.g., -1.6 becomes -2 and 1.6 becomes 1)

FVector

FindClosestPointOnLine

(
FVector Point,
FVector LineOrigin,
FVector LineDirection
)

Find the closest point on an infinite line to a given point.

FVector

FindClosestPointOnSegment

(
FVector Point,
FVector SegmentStart,
FVector SegmentEnd
)

Find the closest point on a segment to a given point.

FRotator

FindLookAtRotation

(
const FVector& Start,
const FVector& Target
)

Find a rotation for an object at Start location to point at Target location.

void

FindNearestPointsOnLineSegments

(
FVector Segment1Start,
FVector Segment1End,
FVector Segment2Start,
FVector Segment2End,
FVector& Segment1Point,
FVector& Segment2Point
)

Find closest points between 2 segments.

float

FInterpEaseInOut

(
float A,
float B,
float Alpha,
float Exponent
)

Interpolate between A and B, applying an ease in/out function.

float

FInterpTo

(
float Current,
float Target,
float DeltaTime,
float InterpSpeed
)

Interpolation functions Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position.

float

FInterpTo_Constant

(
float Current,
float Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target at a constant rate.

float

FixedTurn

(
float InCurrent,
float InDesired,
float InDeltaRate
)

Returns a new rotation component value

float

FloatSpringInterp

(
float Current,
float Target,
FFloatSpringState& SpringState,
float Stiffness,
float CriticalDampingFactor,
float DeltaTime,
float Mass
)

Uses a simple spring model to interpolate a float from Current to Target.

float

FMax

(
float A,
float B
)

Returns the maximum value of A and B

float

FMin

(
float A,
float B
)

Returns the minimum value of A and B

int32

FMod

(
float Dividend,
float Divisor,
float& Remainder
)

Returns the number of times Divisor will go into Dividend (i.e., Dividend divided by Divisor), as well as the remainder

float

Fraction

(
float A
)

Returns the fractional part of a float.

FTimespan

FromDays

(
float Days
)

Returns a time span that represents the specified number of days

FTimespan

FromHours

(
float Hours
)

Returns a time span that represents the specified number of hours

FTimespan

FromMilliseconds

(
float Milliseconds
)

Returns a time span that represents the specified number of milliseconds

FTimespan

FromMinutes

(
float Minutes
)

Returns a time span that represents the specified number of minutes

FTimespan

FromSeconds

(
float Seconds
)

Returns a time span that represents the specified number of seconds

int32

FTrunc

(
float A
)

Rounds A towards zero, truncating the fractional part (e.g., -1.6 becomes -1 and 1.6 becomes 1)

int64

FTrunc64

(
float A
)

Rounds A towards zero, truncating the fractional part (e.g., -1.6 becomes -1 and 1.6 becomes 1)

FIntVector

FTruncVector

(
const FVector& InVector
)

Rounds A to an integer with truncation towards zero for each element in a vector.

float

GenericDivide_FloatFloat

(
float A,
float B
)

float

GenericPercent_FloatFloat

(
float A,
float B
)

FVector2D

GetAbs2D

(
FVector2D A
)

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

float

GetAbsMax2D

(
FVector2D A
)

Get the maximum absolute value of the vector's components.

void

GetAxes

(
FRotator A,
FVector& X,
FVector& Y,
FVector& Z
)

Get the reference frame direction vectors (axes) described by this rotation

void

GetAzimuthAndElevation

(
FVector InDirection,
const FTransform& ReferenceFrame,
float& Azimuth,
float& Elevation
)

Breaks a direction vector apart into Azimuth (Yaw) and Elevation (Pitch) rotation values given in degrees.

FDateTime

GetDate

(
FDateTime A
)

Returns the date component of A

int32

GetDay

(
FDateTime A
)

Returns the day component of A (1 to 31)

int32

GetDayOfYear

(
FDateTime A
)

Returns the day of year of A

int32

GetDays

(
FTimespan A
)

Returns the days component of A

FVector

GetDirectionUnitVector

(
FVector From,
FVector To
)

Find the unit direction vector from one position to another or (0,0,0) if positions are the same.

FTimespan

GetDuration

(
FTimespan A
)

Returns the absolute value of A

FVector

GetForwardVector

(
FRotator InRot
)

Rotate the world forward vector by the given rotation

int32

GetHour

(
FDateTime A
)

Returns the hour component of A (24h format)

int32

GetHour12

(
FDateTime A
)

Returns the hour component of A (12h format)

int32

GetHours

(
FTimespan A
)

Returns the hours component of A

float

GetMax2D

(
FVector2D A
)

Get the maximum value of the vector's components.

float

GetMaxElement

(
FVector A
)

Find the maximum element (X, Y or Z) of a vector

int32

GetMillisecond

(
FDateTime A
)

Returns the millisecond component of A

int32

GetMilliseconds

(
FTimespan A
)

Returns the milliseconds component of A

float

GetMin2D

(
FVector2D A
)

Get the minimum value of the vector's components.

float

GetMinElement

(
FVector A
)

Find the minimum element (X, Y or Z) of a vector

int32

GetMinute

(
FDateTime A
)

Returns the minute component of A

int32

GetMinutes

(
FTimespan A
)

Returns the minutes component of A

int32

GetMonth

(
FDateTime A
)

Returns the month component of A

float

GetPI()

Returns the value of PI

float

GetPointDistanceToLine

(
FVector Point,
FVector LineOrigin,
FVector LineDirection
)

Find the distance from a point to the closest point on an infinite line.

float

GetPointDistanceToSegment

(
FVector Point,
FVector SegmentStart,
FVector SegmentEnd
)

Find the distance from a point to the closest point on a segment.

FVector

GetReflectionVector

(
FVector Direction,
FVector SurfaceNormal
)

Given a direction vector and a surface normal, returns the vector reflected across the surface normal.

FVector

GetRightVector

(
FRotator InRot
)

Rotate the world right vector by the given rotation

FVector2D

GetRotated2D

(
FVector2D A,
float AngleDeg
)

Rotates around axis (0,0,1)

int32

GetSecond

(
FDateTime A
)

Returns the second component of A

int32

GetSeconds

(
FTimespan A
)

Returns the seconds component of A

void

GetSlopeDegreeAngles

(
const FVector& MyRightYAxis,
const FVector& FloorNormal,
const FVector& UpVector,
float& OutSlopePitchDegreeAngle,
float& OutSlopeRollDegreeAngle
)

Returns Slope Pitch and Roll angles in degrees based on the following information:

float

GetTAU()

Returns the value of TAU (= 2 * PI)

FTimespan

GetTimeOfDay

(
FDateTime A
)

Returns the time elapsed since midnight of A

float

GetTotalDays

(
FTimespan A
)

Returns the total number of days in A

float

GetTotalHours

(
FTimespan A
)

Returns the total number of hours in A

float

GetTotalMilliseconds

(
FTimespan A
)

Returns the total number of milliseconds in A

float

GetTotalMinutes

(
FTimespan A
)

Returns the total number of minutes in A

float

GetTotalSeconds

(
FTimespan A
)

Returns the total number of seconds in A

FVector

GetUpVector

(
FRotator InRot
)

Rotate the world up vector by the given rotation

FVector

GetVectorArrayAverage

(
const TArray< FVector >& Vectors
)

Find the average of an array of vectors

void

GetYawPitchFromVector

(
FVector InVec,
float& Yaw,
float& Pitch
)

Breaks a vector apart into Yaw, Pitch rotation values given in degrees. (non-clamped)

int32

GetYear

(
FDateTime A
)

Returns the year component of A

bool

Greater_ByteByte

(
uint8 A,
uint8 B
)

Returns true if A is greater than B (A > B)

bool

Greater_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Returns true if A is greater than B (A > B)

bool

Greater_FloatFloat

(
float A,
float B
)

Returns true if A is greater than B (A > B)

bool

Greater_Int64Int64

(
int64 A,
int64 B
)

Returns true if A is greater than B (A > B)

bool

Greater_IntInt

(
int32 A,
int32 B
)

Returns true if A is greater than B (A > B)

bool

Greater_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Returns true if A is greater than B (A > B)

bool

GreaterEqual_ByteByte

(
uint8 A,
uint8 B
)

Returns true if A is greater than or equal to B (A >= B)

bool

GreaterEqual_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Returns true if A is greater than or equal to B (A >= B)

bool

GreaterEqual_FloatFloat

(
float A,
float B
)

Returns true if A is greater than or equal to B (A >= B)

bool

GreaterEqual_Int64Int64

(
int64 A,
int64 B
)

Returns true if A is greater than or equal to B (A >= B)

bool

GreaterEqual_IntInt

(
int32 A,
int32 B
)

Returns true if A is greater than or equal to B (A >= B)

bool

GreaterEqual_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Returns true if A is greater than or equal to B (A >= B)

FVector

GreaterGreater_VectorRotator

(
FVector A,
FRotator B
)

Returns result of vector A rotated by Rotator B

float

GridSnap_Float

(
float Location,
float GridSize
)

Snaps a value to the nearest grid multiple.

FLinearColor

HSVToRGB

(
float H,
float S,
float V,
float A
)

Make a color from individual color components (HSV space; Hue is [0..360) while Saturation and Value are 0..1)

void

HSVToRGB_Vector

(
FLinearColor HSV,
FLinearColor& RGB
)

Converts a HSV linear color (where H is in R (0..360), S is in G (0..1), and V is in B (0..1)) to RGB

FLinearColor

HSVToRGBLinear

(
FLinearColor HSV
)

Converts a HSV linear color (where H is in R, S is in G, and V is in B) to linear RGB

float

Hypotenuse

(
float Width,
float Height
)

Returns the hypotenuse of a right-angled triangle given the width and height.

bool

InRange_FloatFloat

(
float Value,
float Min,
float Max,
bool InclusiveMin,
bool InclusiveMax
)

Returns true if value is between Min and Max (V >= Min && V <= Max) If InclusiveMin is true, value needs to be equal or larger than Min, else it needs to be larger If InclusiveMax is true, value needs to be smaller or equal than Max, else it needs to be smaller

bool

InRange_Int64Int64

(
int64 Value,
int64 Min,
int64 Max,
bool InclusiveMin,
bool InclusiveMax
)

Returns true if value is between Min and Max (V >= Min && V <= Max) If InclusiveMin is true, value needs to be equal or larger than Min, else it needs to be larger If InclusiveMax is true, value needs to be smaller or equal than Max, else it needs to be smaller

bool

InRange_IntInt

(
int32 Value,
int32 Min,
int32 Max,
bool InclusiveMin,
bool InclusiveMax
)

Returns true if value is between Min and Max (V >= Min && V <= Max) If InclusiveMin is true, value needs to be equal or larger than Min, else it needs to be larger If InclusiveMax is true, value needs to be smaller or equal than Max, else it needs to be smaller

FIntPoint

IntPoint_Down()

Down Int Point (0, 1)

FIntPoint

IntPoint_Left()

Left Int Point (-1, 0)

FIntPoint

IntPoint_One()

One Int Point (1, 1)

FIntPoint

IntPoint_Right()

Right Int Point (1, 0)

FIntPoint

IntPoint_Up()

Up Int Point (0, -1)

FIntPoint

IntPoint_Zero()

IntPoint constantsZero Int Point (0, 0)

FIntPoint

FVector

InverseTransformDirection

(
const FTransform& T,
FVector Direction
)

Transform a direction vector by the inverse of the supplied transform - will not change its length.

FVector

InverseTransformLocation

(
const FTransform& T,
FVector Location
)

Transform a position by the inverse of the supplied transform.

FRotator

InverseTransformRotation

(
const FTransform& T,
FRotator Rotation
)

Transform a rotator by the inverse of the supplied transform.

FTransform

InvertTransform

(
const FTransform& T
)

Returns the inverse of the given transform T.

bool

IsAfternoon

(
FDateTime A
)

Returns whether A's time is in the afternoon

bool

IsLeapYear

(
int32 Year
)

Returns whether given year is a leap year

bool

IsMorning

(
FDateTime A
)

Returns whether A's time is in the morning

bool

IsNearlyZero2D

(
const FVector2D& A,
float Tolerance
)

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

bool

IsPointInBox

(
FVector Point,
FVector BoxOrigin,
FVector BoxExtent
)

Determines whether the given point is in a box. Includes points on the box.

bool

IsPointInBoxWithTransform

(
FVector Point,
const FTransform& BoxWorldTransfor...,
FVector BoxExtent
)

Determines whether a given point is in a box with a given transform. Includes points on the box.

bool

IsZero2D

(
const FVector2D& A
)

Checks whether all components of the vector are exactly zero.

float

Lerp

(
float A,
float B,
float Alpha
)

Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha=1)

bool

Less_ByteByte

(
uint8 A,
uint8 B
)

Returns true if A is less than B (A < B)

bool

Less_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Returns true if A is less than B (A < B)

bool

Less_FloatFloat

(
float A,
float B
)

Returns true if A is Less than B (A < B)

bool

Less_Int64Int64

(
int64 A,
int64 B
)

Returns true if A is less than B (A < B)

bool

Less_IntInt

(
int32 A,
int32 B
)

Returns true if A is less than B (A < B)

bool

Less_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Returns true if A is less than B (A < B)

bool

LessEqual_ByteByte

(
uint8 A,
uint8 B
)

Returns true if A is less than or equal to B (A <= B)

bool

LessEqual_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Returns true if A is less than or equal to B (A <= B)

bool

LessEqual_FloatFloat

(
float A,
float B
)

Returns true if A is Less than or equal to B (A <= B)

bool

LessEqual_Int64Int64

(
int64 A,
int64 B
)

Returns true if A is less than or equal to B (A <= B)

bool

LessEqual_IntInt

(
int32 A,
int32 B
)

Returns true if A is less than or equal to B (A <= B)

bool

LessEqual_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Returns true if A is less than or equal to B (A <= B)

FVector

LessLess_VectorRotator

(
FVector A,
FRotator B
)

Returns result of vector A rotated by the inverse of Rotator B

FLinearColor

LinearColor_Black()

Black linear color

FLinearColor

LinearColor_Blue()

Blue linear color

FLinearColor

LinearColor_Desaturated

(
FLinearColor InColor,
float InDesaturation
)

Returns a desaturated color, with 0 meaning no desaturation and 1 == full desaturation

float

LinearColor_Distance

(
FLinearColor C1,
FLinearColor C2
)

Euclidean distance between two color points.

float

LinearColor_GetLuminance

(
FLinearColor InColor
)

Returns the perceived brightness of a color on a display taking into account the impact on the human eye per color channel: green > red > blue.

float

LinearColor_GetMax

(
FLinearColor InColor
)

Returns the maximum color channel value in this color structure

float

LinearColor_GetMin

(
FLinearColor InColor
)

Returns the minimum color channel value in this color structure

FLinearColor

LinearColor_Gray()

Grey linear color

FLinearColor

LinearColor_Green()

Green linear color

bool

LinearColor_IsNearEqual

(
FLinearColor A,
FLinearColor B,
float Tolerance
)

Returns true if linear color A is equal to linear color B (A == B) within a specified error tolerance

FColor

LinearColor_Quantize

(
FLinearColor InColor
)

Quantizes the linear color and returns the result as an 8-bit color.

FColor

LinearColor_QuantizeRound

(
FLinearColor InColor
)

Quantizes the linear color with rounding and returns the result as an 8-bit color.

FLinearColor

LinearColor_Red()

Red linear color

void

LinearColor_Set

(
FLinearColor& InOutColor,
FLinearColor InColor
)

Assign contents of InColor

void

LinearColor_SetFromHSV

(
FLinearColor& InOutColor,
float H,
float S,
float V,
float A
)

Assigns an HSV color to a linear space RGB color

void

LinearColor_SetFromPow22

(
FLinearColor& InOutColor,
const FColor& InColor
)

Assigns an FColor coming from an observed Pow(1/2.2) output, into a linear color.

void

LinearColor_SetFromSRGB

(
FLinearColor& InOutColor,
const FColor& InSRGB
)

Assigns an FColor coming from an observed sRGB output, into a linear color.

void

LinearColor_SetRandomHue

(
FLinearColor& InOutColor
)

Sets to a random color. Choses a quite nice color based on a random hue.

void

LinearColor_SetRGBA

(
FLinearColor& InOutColor,
float R,
float G,
float B,
float A
)

void

LinearColor_SetTemperature

(
FLinearColor& InOutColor,
float InTemperature
)

Converts temperature in Kelvins of a black body radiator to RGB chromaticity.

FLinearColor

LinearColor_ToNewOpacity

(
FLinearColor InColor,
float InOpacity
)

Returns a copy of this color using the specified opacity/alpha.

FColor

LinearColor_ToRGBE

(
FLinearColor InLinearColor
)

Convert from linear to 8-bit RGBE as outlined in Gregory Ward's Real Pixels article, Graphics Gems II, page 80.

FLinearColor

LinearColor_Transparent()

Transparent linear color - black with 0 opacity/alpha

FLinearColor

LinearColor_White()

LinearColor constants - exposed for scriptingWhite linear color

FLinearColor

LinearColor_Yellow()

Yellow linear color

FLinearColor

LinearColorLerp

(
FLinearColor A,
FLinearColor B,
float Alpha
)

Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha=1)

FLinearColor

LinearColorLerpUsingHSV

(
FLinearColor A,
FLinearColor B,
float Alpha
)

Linearly interpolates between two colors by the specified Alpha amount (100% of A when Alpha=0 and 100% of B when Alpha=1).

bool

LinePlaneIntersection

(
const FVector& LineStart,
const FVector& LineEnd,
const FPlane& APlane,
float& T,
FVector& Intersection
)

Intersection Computes the intersection point between a line and a plane.

bool

LinePlaneIntersection_OriginNormal

(
const FVector& LineStart,
const FVector& LineEnd,
FVector PlaneOrigin,
FVector PlaneNormal,
float& T,
FVector& Intersection
)

Computes the intersection point between a line and a plane.

float

Log

(
float A,
float Base
)

Returns log of A base B (if B^R == A, returns R)

float

Loge

(
float A
)

Returns natural log of A (if e^R == A, returns R)

FBox

MakeBox

(
FVector Min,
FVector Max
)

Box functionsMakes an FBox from Min and Max and sets IsValid to true

FBox2D

MakeBox2D

(
FVector2D Min,
FVector2D Max
)

Box2D functionsMakes an FBox2D from Min and Max and sets IsValid to true

FLinearColor

MakeColor

(
float R,
float G,
float B,
float A
)

LinearColor functionsMake a color from individual color components (RGB space)

FDateTime

MakeDateTime

(
int32 Year,
int32 Month,
int32 Day,
int32 Hour,
int32 Minute,
int32 Second,
int32 Millisecond
)

DateTime functions.Makes a DateTime struct

FFrameRate

MakeFrameRate

(
int32 Numerator,
int32 Denominator
)

Creates a FFrameRate from a Numerator and a Denominator.

FPlane

MakePlaneFromPointAndNormal

(
FVector Point,
FVector Normal
)

Plane functions. Creates a plane with a facing direction of Normal at the given Point

float

MakePulsatingValue

(
float InCurrentTime,
float InPulsesPerSecond,
float InPhase
)

Simple function to create a pulsating scalar value

FQualifiedFr...

MakeQualifiedFrameTime

(
FFrameRate FrameRate,
float SubFrame
)

Frame Time and Frame Rate FunctionsCreates a FQualifiedFrameTime out of a frame number, frame rate, and optional 0-1 clamped subframe.

FRandomStrea...

MakeRandomStream

(
int32 InitialSeed
)

Misc functionsMakes a SRand-based random number generator

FTransform

MakeRelativeTransform

(
const FTransform& A,
const FTransform& RelativeTo
)

Computes a relative transform of one transform compared to another.

FRotator

MakeRotationFromAxes

(
FVector Forward,
FVector Right,
FVector Up
)

Build a reference frame from three axes.

FRotator

MakeRotator

(
float Roll,
float Pitch,
float Yaw
)

Rotator functions.Makes a rotator {Roll, Pitch, Yaw} from rotation values supplied in degrees

FRotator

MakeRotFromX

(
const FVector& X
)

Builds a rotator given only a XAxis.

FRotator

MakeRotFromXY

(
const FVector& X,
const FVector& Y
)

Builds a matrix with given X and Y axes.

FRotator

MakeRotFromXZ

(
const FVector& X,
const FVector& Z
)

Builds a matrix with given X and Z axes.

FRotator

MakeRotFromY

(
const FVector& Y
)

Builds a rotation matrix given only a YAxis.

FRotator

MakeRotFromYX

(
const FVector& Y,
const FVector& X
)

Builds a matrix with given Y and X axes.

FRotator

MakeRotFromYZ

(
const FVector& Y,
const FVector& Z
)

Builds a matrix with given Y and Z axes.

FRotator

MakeRotFromZ

(
const FVector& Z
)

Builds a rotation matrix given only a ZAxis.

FRotator

MakeRotFromZX

(
const FVector& Z,
const FVector& X
)

Builds a matrix with given Z and X axes.

FRotator

MakeRotFromZY

(
const FVector& Z,
const FVector& Y
)

Builds a matrix with given Z and Y axes.

FTimespan

MakeTimespan

(
int32 Days,
int32 Hours,
int32 Minutes,
int32 Seconds,
int32 Milliseconds
)

Timespan functions.Makes a Timespan struct

FTimespan

MakeTimespan2

(
int32 Days,
int32 Hours,
int32 Minutes,
int32 Seconds,
int32 FractionNano
)

Makes a Timespan struct

FTransform

MakeTransform

(
FVector Location,
FRotator Rotation,
FVector Scale
)

Transform functionsMake a transform from location, rotation and scale

FVector

MakeVector

(
float X,
float Y,
float Z
)

Vector (3D) functions.Makes a vector {X, Y, Z}

FVector2D

MakeVector2D

(
float X,
float Y
)

Vector2D functionsMakes a 2d vector {X, Y}

FVector4

MakeVector4

(
float X,
float Y,
float Z,
float W
)

Vector4 functionsMakes a 4D vector {X, Y, Z, W}

float

MapRangeClamped

(
float Value,
float InRangeA,
float InRangeB,
float OutRangeA,
float OutRangeB
)

Returns Value mapped from one range into another where the Value is clamped to the Input Range.

float

MapRangeUnclamped

(
float Value,
float InRangeA,
float InRangeB,
float OutRangeA,
float OutRangeB
)

Returns Value mapped from one range into another.

FMatrix

Matrix_ApplyScale

(
const FMatrix& M,
float Scale
)

Apply Scale to this matrix (Assumes Matrix represents a transform)

FMatrix

Matrix_ConcatenateTranslation

(
const FMatrix& M,
FVector Translation
)

Returns a matrix with an additional translation concatenated.

bool

Matrix_ContainsNaN

(
const FMatrix& M
)

Returns true if any element of this matrix is NaN

FVector

Matrix_GetColumn

(
const FMatrix& M,
TEnumAsByte< EMatrixColumns::Type >...
)

Get a column of this matrix

float

Matrix_GetDeterminant

(
const FMatrix& M
)

bool

Matrix_GetFrustumBottomPlane

(
const FMatrix& M,
FPlane& OutPlane
)

Get the bottom plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

bool

Matrix_GetFrustumFarPlane

(
const FMatrix& M,
FPlane& OutPlane
)

Get the far plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

bool

Matrix_GetFrustumLeftPlane

(
const FMatrix& M,
FPlane& OutPlane
)

Get the left plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

bool

Matrix_GetFrustumNearPlane

(
const FMatrix& M,
FPlane& OutPlane
)

Get the near plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

bool

Matrix_GetFrustumRightPlane

(
const FMatrix& M,
FPlane& OutPlane
)

Get the right plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

bool

Matrix_GetFrustumTopPlane

(
const FMatrix& M,
FPlane& OutPlane
)

Get the top plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

FMatrix

Matrix_GetInverse

(
const FMatrix& M
)

Get the inverse of the Matrix. Handles nil matrices.

FMatrix

Matrix_GetMatrixWithoutScale

(
const FMatrix& M,
float Tolerance
)

Returns matrix after RemoveScaling with error Tolerance (Assumes Matrix represents a transform)

float

Matrix_GetMaximumAxisScale

(
const FMatrix& M
)

FVector

Matrix_GetOrigin

(
const FMatrix& InMatrix
)

Get the origin of the co-ordinate system (Assumes Matrix represents a transform)

FRotator

Matrix_GetRotator

(
const FMatrix& M
)

Get the rotator representation of this matrix (Assumes Matrix represents a transform)

float

Matrix_GetRotDeterminant

(
const FMatrix& M
)

void

Matrix_GetScaledAxes

(
const FMatrix& M,
FVector& X,
FVector& Y,
FVector& Z
)

Get axes of this matrix scaled by the scale of the matrix (Assumes Matrix represents a transform)

FVector

Matrix_GetScaledAxis

(
const FMatrix& M,
TEnumAsByte< EAxis::Type > Axis
)

Get axis of this matrix scaled by the scale of the matrix (Assumes Matrix represents a transform)

FVector

Matrix_GetScaleVector

(
const FMatrix& M,
float Tolerance
)

Return a 3D scale vector calculated from this matrix (where each component is the magnitude of a row vector) with error Tolerance.

FMatrix

(
const FMatrix& M
)

Get the Transose Adjoint of the Matrix.

FMatrix

Matrix_GetTransposed

(
const FMatrix& M
)

Transpose.

void

Matrix_GetUnitAxes

(
const FMatrix& M,
FVector& X,
FVector& Y,
FVector& Z
)

Get unit length axes of this matrix (Assumes Matrix represents a transform)

FVector

Matrix_GetUnitAxis

(
const FMatrix& M,
TEnumAsByte< EAxis::Type > Axis
)

Get unit length axis of this matrix (Assumes Matrix represents a transform)

FMatrix

Matrix_Identity()

Identity matrix.

FVector

Matrix_InverseTransformPosition

(
const FMatrix& M,
FVector V
)

Inverts the matrix and then transforms V - correctly handles scaling in this matrix.

FVector

Matrix_InverseTransformVector

(
const FMatrix& M,
FVector V
)

Transform a direction vector by the inverse of this matrix - will not take into account translation part.

FMatrix

Matrix_Mirror

(
const FMatrix& M,
TEnumAsByte< EAxis::Type > MirrorAx...,
TEnumAsByte< EAxis::Type > FlipAxis
)

Utility for mirroring this transform across a certain plane, and flipping one of the axis as well.

void

Matrix_RemoveScaling

(
FMatrix& M,
float Tolerance
)

Remove any scaling from this matrix (ie magnitude of each row is 1) with error Tolerance (Assumes Matrix represents a transform)

FMatrix

Matrix_RemoveTranslation

(
const FMatrix& M
)

Remove any translation from this matrix (Assumes Matrix represents a transform)

FMatrix

Matrix_ScaleTranslation

(
const FMatrix& M,
FVector Scale3D
)

Scale the translation part of the matrix by the supplied vector.

void

Matrix_SetAxis

(
FMatrix& M,
TEnumAsByte< EAxis::Type > Axis,
FVector AxisVector
)

Set an axis of this matrix (Assumes Matrix represents a transform)

void

Matrix_SetColumn

(
FMatrix& M,
TEnumAsByte< EMatrixColumns::Type >...,
FVector Value
)

void

Matrix_SetOrigin

(
FMatrix& M,
FVector NewOrigin
)

Set the origin of the coordinate system to the given vector (Assumes Matrix represents a transform)

FQuat

Matrix_ToQuat

(
const FMatrix& M
)

Transform a rotation matrix into a quaternion.

FVector4

Matrix_TransformPosition

(
const FMatrix& M,
FVector V
)

Transform a location - will take into account translation part of the FMatrix.

FVector4

Matrix_TransformVector

(
const FMatrix& M,
FVector V
)

Transform a direction vector - will not take into account translation part of the FMatrix.

FVector4

Matrix_TransformVector4

(
const FMatrix& M,
FVector4 V
)

Transform a vector by the matrix. (Assumes Matrix represents a transform)

int32

Max

(
int32 A,
int32 B
)

Returns the maximum value of A and B

int64

MaxInt64

(
int64 A,
int64 B
)

Returns the maximum value of A and B

void

MaxOfByteArray

(
const TArray< uint8 >& ByteArray,
int32& IndexOfMaxValue,
uint8& MaxValue
)

Returns max of all array entries and the index at which it was found.

void

MaxOfFloatArray

(
const TArray< float >& FloatArray,
int32& IndexOfMaxValue,
float& MaxValue
)

Returns max of all array entries and the index at which it was found.

void

MaxOfIntArray

(
const TArray< int32 >& IntArray,
int32& IndexOfMaxValue,
int32& MaxValue
)

Returns max of all array entries and the index at which it was found.

int32

Min

(
int32 A,
int32 B
)

Returns the minimum value of A and B

void

MinimumAreaRectangle

(
UObject* WorldContextObject,
const TArray< FVector >& InVerts,
const FVector& SampleSurfaceNormal,
FVector& OutRectCenter,
FRotator& OutRectRotation,
float& OutSideLengthX,
float& OutSideLengthY,
bool bDebugDraw
)

Geometry Finds the minimum area rectangle that encloses all of the points in InVerts Uses algorithm found in http://www.geometrictools.com/Documentation/MinimumAreaRectangle.pdf

int64

MinInt64

(
int64 A,
int64 B
)

Returns the minimum value of A and B

void

MinOfByteArray

(
const TArray< uint8 >& ByteArray,
int32& IndexOfMinValue,
uint8& MinValue
)

Returns min of all array entries and the index at which it was found.

void

MinOfFloatArray

(
const TArray< float >& FloatArray,
int32& IndexOfMinValue,
float& MinValue
)

Returns min of all array entries and the index at which it was found.

void

MinOfIntArray

(
const TArray< int32 >& IntArray,
int32& IndexOfMinValue,
int32& MinValue
)

Returns min of all array entries and the index at which it was found.

FVector

MirrorVectorByNormal

(
FVector InVect,
FVector InNormal
)

Given a direction vector and a surface normal, returns the vector reflected across the surface normal.

uint8

Multiply_ByteByte

(
uint8 A,
uint8 B
)

Byte functions.Multiplication (A * B)

float

Multiply_FloatFloat

(
float A,
float B
)

Multiplication (A * B)

int64

Multiply_Int64Int64

(
int64 A,
int64 B
)

Integer64 functions.Multiplication (A * B)

float

Multiply_IntFloat

(
int32 A,
float B
)

Multiplication (A * B)

int32

Multiply_IntInt

(
int32 A,
int32 B
)

Integer functions.Multiplication (A * B)

FIntPoint

Multiply_IntPointInt

(
FIntPoint A,
int32 B
)

Returns IntPoint A multiplied by B

FIntPoint

Multiply_IntPointIntPoint

(
FIntPoint A,
FIntPoint B
)

Returns IntPoint A multiplied by B

FLinearColor

Multiply_LinearColorFloat

(
FLinearColor A,
float B
)

Element-wise multiplication of a linear color by a float (F*R, F*G, F*B, F*A)

FLinearColor

Multiply_LinearColorLinearColor

Element-wise multiplication of two linear colors (R*R, G*G, B*B, A*A)

FMatrix

Multiply_MatrixFloat

(
const FMatrix& A,
float B
)

Multiplies all values of the matrix by a float.

FMatrix

Multiply_MatrixMatrix

(
const FMatrix& A,
const FMatrix& B
)

Gets the result of multiplying a Matrix to this.

FQuat

Multiply_QuatQuat

(
const FQuat& A,
const FQuat& B
)

Gets the result of multiplying two quaternions (A * B).

FRotator

Multiply_RotatorFloat

(
FRotator A,
float B
)

Returns rotator representing rotator A scaled by B

FRotator

Multiply_RotatorInt

(
FRotator A,
int32 B
)

Returns rotator representing rotator A scaled by B

FTimespan

Multiply_TimespanFloat

(
FTimespan A,
float Scalar
)

Scalar multiplication (A * s)

FVector2D

Multiply_Vector2DFloat

(
FVector2D A,
float B
)

Returns Vector A scaled by B

FVector2D

Multiply_Vector2DVector2D

(
FVector2D A,
FVector2D B
)

Element-wise Vector multiplication (Result = {A.x*B.x, A.y*B.y})

FVector4

Multiply_Vector4Vector4

(
const FVector4& A,
const FVector4& B
)

Element-wise Vector multiplication (Result = {A.x*B.x, A.y*B.y, A.z*B.z, A.w*B.w})

FVector

Multiply_VectorFloat

(
FVector A,
float B
)

Scales Vector A by B

FVector

Multiply_VectorInt

(
FVector A,
int32 B
)

Scales Vector A by B

FVector

Multiply_VectorVector

(
FVector A,
FVector B
)

Element-wise Vector multiplication (Result = {A.x*B.x, A.y*B.y, A.z*B.z})

float

MultiplyByPi

(
float Value
)

Multiplies the input value by pi.

float

MultiplyMultiply_FloatFloat

(
float Base,
float Exp
)

Float functions.Power (Base to the Exp-th power)

bool

NearlyEqual_FloatFloat

(
float A,
float B,
float ErrorTolerance
)

Returns true if A is nearly equal to B (|A - B| < ErrorTolerance)

bool

NearlyEqual_TransformTransform

(
const FTransform& A,
const FTransform& B,
float LocationTolerance,
float RotationTolerance,
float Scale3DTolerance
)

Returns true if transform A is nearly equal to B

FVector2D

Negated2D

(
const FVector2D& A
)

Gets a negated copy of the vector.

FRotator

NegateRotator

(
FRotator A
)

Negate a rotator

FVector

NegateVector

(
FVector A
)

Negate a vector.

FVector

Normal

(
FVector A,
float Tolerance
)

Gets a normalized unit copy of the vector, ensuring it is safe to do so based on the length.

FVector2D

Normal2D

(
FVector2D A
)

Returns a unit normal version of the 2D vector

void

Normalize2D

(
FVector2D& A,
float Tolerance
)

Normalize this vector in-place if it is large enough, set it to (0,0) otherwise.

float

NormalizeAxis

(
float Angle
)

Clamps an angle to the range of [-180, 180].

FRotator

NormalizedDeltaRotator

(
FRotator A,
FRotator B
)

Normalized A-B

float

NormalizeToRange

(
float Value,
float RangeMin,
float RangeMax
)

Returns Value normalized to the given range.

FVector2D

NormalSafe2D

(
FVector2D A,
float Tolerance
)

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

int32

Not_Int

(
int32 A
)

Bitwise NOT (~A)

int64

Not_Int64

(
int64 A
)

Bitwise NOT (~A)

bool

Not_PreBool

(
bool A
)

Returns the logical complement of the Boolean value (NOT A)

bool

NotEqual_BoolBool

(
bool A,
bool B
)

Returns true if the values are not equal (A != B)

bool

NotEqual_ByteByte

(
uint8 A,
uint8 B
)

Returns true if A is not equal to B (A != B)

bool

NotEqual_ClassClass

(
UClass* A,
UClass* B
)

Returns true if A and B are not equal (A != B)

bool

NotEqual_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Returns true if the values are not equal (A != B)

bool

NotEqual_FloatFloat

(
float A,
float B
)

Returns true if A does not equal B (A != B)

bool

NotEqual_Int64Int64

(
int64 A,
int64 B
)

Returns true if A is not equal to B (A != B)

bool

NotEqual_IntInt

(
int32 A,
int32 B
)

Returns true if A is not equal to B (A != B)

bool

NotEqual_IntPointIntPoint

(
FIntPoint A,
FIntPoint B
)

Returns true if IntPoint A is NOT equal to IntPoint B (A != B)

bool

NotEqual_LinearColorLinearColor

Returns true if linear color A is not equal to linear color B (A != B) within a specified error tolerance

bool

NotEqual_MatrixMatrix

(
const FMatrix& A,
const FMatrix& B,
float Tolerance
)

Checks whether another Matrix is not equal to this, within specified tolerance.

bool

NotEqual_NameName

(
FName A,
FName B
)

Returns true if A and B are not equal (A != B)

bool

NotEqual_ObjectObject

(
UObject* A,
UObject* B
)

Returns true if A and B are not equal (A != B)

bool

NotEqual_QuatQuat

(
const FQuat& A,
const FQuat& B,
float ErrorTolerance
)

Returns true if Quat A is not equal to Quat B (A != B) within a specified error tolerance

bool

NotEqual_RotatorRotator

(
FRotator A,
FRotator B,
float ErrorTolerance
)

Returns true if rotator A is not equal to rotator B (A != B) within a specified error tolerance

bool

NotEqual_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Returns true if the values are not equal (A != B)

bool

NotEqual_Vector2DVector2D

(
FVector2D A,
FVector2D B,
float ErrorTolerance
)

Returns true if vector2D A is not equal to vector2D B (A != B) within a specified error tolerance

bool

NotEqual_Vector4Vector4

(
const FVector4& A,
const FVector4& B,
float ErrorTolerance
)

Returns true if vector A is not equal to vector B (A != B) within a specified error tolerance

bool

NotEqual_VectorVector

(
FVector A,
FVector B,
float ErrorTolerance
)

Returns true if vector A is not equal to vector B (A != B) within a specified error tolerance

bool

NotEqualExactly_Vector2DVector2D

(
FVector2D A,
FVector2D B
)

Returns true if vector2D A is not equal to vector2D B (A != B) within a specified error tolerance

bool

NotEqualExactly_Vector4Vector4

(
const FVector4& A,
const FVector4& B
)

Returns true if vector A is not equal to vector B (A != B) within a specified error tolerance

bool

NotEqualExactly_VectorVector

(
FVector A,
FVector B
)

Returns true if vector A is not equal to vector B (A != B)

FDateTime

Now()

Returns the local date and time on this computer

int64

Or_Int64Int64

(
int64 A,
int64 B
)

Bitwise OR (A | B)

int32

Or_IntInt

(
int32 A,
int32 B
)

Bitwise OR (A | B)

uint8

Percent_ByteByte

(
uint8 A,
uint8 B
)

Modulo (A % B)

float

Percent_FloatFloat

(
float A,
float B
)

Modulo (A % B)

int32

Percent_IntInt

(
int32 A,
int32 B
)

Modulo (A % B)

float

PerlinNoise1D

(
const float Value
)

Generates a 1D Perlin noise from the given value.

bool

PointsAreCoplanar

(
const TArray< FVector >& Points,
float Tolerance
)

Determines whether a given set of points are coplanar, with a tolerance.

FVector

ProjectPointOnToPlane

(
FVector Point,
FVector PlaneBase,
FVector PlaneNormal
)

Projects/snaps a point onto a plane defined by a point on the plane and a plane normal.

FVector

ProjectVectorOnToPlane

(
FVector V,
FVector PlaneNormal
)

Projects a vector onto a plane defined by a normalized vector (PlaneNormal).

FVector

ProjectVectorOnToVector

(
FVector V,
FVector Target
)

Projects one vector (V) onto another (Target) and returns the projected vector.

float

Quat_AngularDistance

(
const FQuat& A,
const FQuat& B
)

Find the angular distance/difference between two rotation quaternions.

void

Quat_EnforceShortestArcWith

(
FQuat& A,
const FQuat& B
)

Modify the quaternion to ensure that the delta between it and B represents the shortest possible rotation angle.

FVector

Quat_Euler

(
const FQuat& Q
)

Convert a Quaternion into floating-point Euler angles (in degrees).

FQuat

Quat_Exp

(
const FQuat& Q
)

Used in combination with Log().

float

Quat_GetAngle

(
const FQuat& Q
)

Get the angle of this quaternion

FVector

Quat_GetAxisX

(
const FQuat& Q
)

Get the forward direction (X axis) after it has been rotated by this Quaternion.

FVector

Quat_GetAxisY

(
const FQuat& Q
)

Get the right direction (Y axis) after it has been rotated by this Quaternion.

FVector

Quat_GetAxisZ

(
const FQuat& Q
)

Get the up direction (Z axis) after it has been rotated by this Quaternion.

FVector

Quat_GetRotationAxis

(
const FQuat& Q
)

Get the axis of rotation of the Quaternion.

FQuat

Quat_Identity()

Quat constants - exposed for scriptingIdentity quaternion constant

FQuat

Quat_Inversed

(
const FQuat& Q
)

Return an inversed copy of this quaternion.

bool

Quat_IsFinite

(
const FQuat& Q
)

Determine if all the values are finite (not NaN nor Inf) in this Quat.

bool

Quat_IsIdentity

(
const FQuat& Q,
float Tolerance
)

Checks whether this Quaternion is an Identity Quaternion. Assumes Quaternion tested is normalized.

bool

Quat_IsNonFinite

(
const FQuat& Q
)

Determine if there are any non-finite values (NaN or Inf) in this Quat.

bool

Quat_IsNormalized

(
const FQuat& Q
)

Return true if this quaternion is normalized

FQuat

Quat_Log

(
const FQuat& Q
)

Quaternion with W=0 and V=theta*v.

FQuat

Quat_MakeFromEuler

(
const FVector& Euler
)

Convert a vector of floating-point Euler angles (in degrees) into a Quaternion.

void

Quat_Normalize

(
FQuat& Q,
float Tolerance
)

Normalize this quaternion if it is large enough as compared to the supplied tolerance.

FQuat

Quat_Normalized

(
const FQuat& Q,
float Tolerance
)

Get a normalized copy of this quaternion. If it is too small, returns an identity quaternion.

FVector

Quat_RotateVector

(
const FQuat& Q,
const FVector& V
)

Rotate a vector by this quaternion.

FRotator

Quat_Rotator

(
const FQuat& Q
)

Convert to Rotator representation of this Quaternion.

void

Quat_SetComponents

(
FQuat& Q,
float X,
float Y,
float Z,
float W
)

Set X, Y, Z, W components of Quaternion.

void

Quat_SetFromEuler

(
FQuat& Q,
const FVector& Euler
)

Convert a vector of floating-point Euler angles (in degrees) into a Quaternion.

float

Quat_Size

(
const FQuat& Q
)

Get the length of the quaternion.

float

Quat_SizeSquared

(
const FQuat& Q
)

Get the squared length of the quaternion.

FVector

Quat_UnrotateVector

(
const FQuat& Q,
const FVector& V
)

Rotate a vector by the inverse of this quaternion.

FVector

Quat_VectorForward

(
const FQuat& Q
)

Get the forward direction (X axis) after it has been rotated by this Quaternion.

FVector

Quat_VectorRight

(
const FQuat& Q
)

Get the right direction (Y axis) after it has been rotated by this Quaternion.

FVector

Quat_VectorUp

(
const FQuat& Q
)

Get the up direction (Z axis) after it has been rotated by this Quaternion.

float

(
float A
)

Returns degrees value based on the input radians

bool

RandomBool()

Boolean functions.Returns a uniformly distributed random bool

bool

RandomBoolFromStream

(
const FRandomStream& Stream
)

Returns a random bool

bool

RandomBoolWithWeight

(
float Weight
)

Get a random chance with the specified weight.

bool

RandomBoolWithWeightFromStream

(
float Weight,
const FRandomStream& RandomStream
)

Get a random chance with the specified weight.

float

RandomFloat()

Returns a random float between 0 and 1

float

RandomFloatFromStream

(
const FRandomStream& Stream
)

Returns a random float between 0 and 1

float

RandomFloatInRange

(
float Min,
float Max
)

Generate a random number between Min and Max

float

RandomFloatInRangeFromStream

(
float Min,
float Max,
const FRandomStream& Stream
)

Generate a random number between Min and Max

int32

RandomInteger

(
int32 Max
)

Returns a uniformly distributed random number between 0 and Max - 1

int64

RandomInteger64

(
int64 Max
)

Returns a uniformly distributed random number between 0 and Max - 1

int64

RandomInteger64InRange

(
int64 Min,
int64 Max
)

Return a random integer64 between Min and Max (>= Min and <= Max)

int32

RandomIntegerFromStream

(
int32 Max,
const FRandomStream& Stream
)

Random stream functionsReturns a uniformly distributed random number between 0 and Max - 1

int32

RandomIntegerInRange

(
int32 Min,
int32 Max
)

Return a random integer between Min and Max (>= Min and <= Max)

int32

RandomIntegerInRangeFromStream

(
int32 Min,
int32 Max,
const FRandomStream& Stream
)

Return a random integer between Min and Max (>= Min and <= Max)

FVector

RandomPointInBoundingBox

(
FVector Origin,
FVector BoxExtent
)

Returns a random point within the specified bounding box using the first vector as an origin and the second as the box extents.

FRotator

RandomRotator

(
bool bRoll
)

Generates a random rotation, with optional random roll.

FRotator

RandomRotatorFromStream

(
bool bRoll,
const FRandomStream& Stream
)

Create a random rotation

FVector

RandomUnitVector()

Returns a random vector with length of 1

FVector

RandomUnitVectorFromStream

(
const FRandomStream& Stream
)

Returns a random vector with length of 1.0

FVector

RandomUnitVectorInConeInDegrees

(
FVector ConeDir,
float ConeHalfAngleInDegrees
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

RandomUnitVectorInConeInDegreesFromStream

(
const FVector& ConeDir,
float ConeHalfAngleInDegrees,
const FRandomStream& Stream
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

(
FVector ConeDir,
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

(
const FVector& ConeDir,
const FRandomStream& Stream
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

RandomUnitVectorInEllipticalConeInDegrees

(
FVector ConeDir,
float MaxYawInDegrees,
float MaxPitchInDegrees
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

RandomUnitVectorInEllipticalConeInDegreesFromStream

(
const FVector& ConeDir,
float MaxYawInDegrees,
float MaxPitchInDegrees,
const FRandomStream& Stream
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

(
FVector ConeDir,
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FVector

(
const FVector& ConeDir,
const FRandomStream& Stream
)

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

FRotator

REase

(
FRotator A,
FRotator B,
float Alpha,
bool bShortestPath,
TEnumAsByte< EEasingFunc::Type > Ea...,
float BlendExp,
int32 Steps
)

Easing between A and B using a specified easing function

void

ResetFloatSpringState

(
FFloatSpringState& SpringState
)

Resets the state of a given spring

void

ResetRandomStream

(
const FRandomStream& Stream
)

Reset a random stream

void

ResetVectorSpringState

(
FVectorSpringState& SpringState
)

Resets the state of a given spring

FLinearColor

RGBLinearToHSV

(
FLinearColor RGB
)

Converts a RGB linear color to HSV (where H is in R, S is in G, and V is in B)

void

RGBToHSV

(
FLinearColor InColor,
float& H,
float& S,
float& V,
float& A
)

Breaks apart a color into individual HSV components (as well as alpha) (Hue is [0..360) while Saturation and Value are 0..1)

void

RGBToHSV_Vector

(
FLinearColor RGB,
FLinearColor& HSV
)

Converts a RGB linear color to HSV (where H is in R (0..360), S is in G (0..1), and V is in B (0..1))

FRotator

RInterpTo

(
FRotator Current,
FRotator Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target rotation based on Current rotation, giving a nice smooth feeling when rotating to Target rotation.

FRotator

RInterpTo_Constant

(
FRotator Current,
FRotator Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target rotation at a constant rate.

FRotator

FRotator

RLerp

(
FRotator A,
FRotator B,
float Alpha,
bool bShortestPath
)

Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha=1)

FVector

RotateAngleAxis

(
FVector InVect,
float AngleDeg,
FVector Axis
)

Returns result of vector A rotated by AngleDeg around Axis

FRotator

RotatorFromAxisAndAngle

(
FVector Axis,
float Angle
)

Create a rotation from an this axis and supplied angle (in degrees)

int32

Round

(
float A
)

Rounds A to the nearest integer (e.g., -1.6 becomes -2 and 1.6 becomes 2)

int64

Round64

(
float A
)

Rounds A to the nearest integer (e.g., -1.6 becomes -2 and 1.6 becomes 2)

float

SafeDivide

(
float A,
float B
)

This functions returns 0 if B (the denominator) is zero

void

SeedRandomStream

(
FRandomStream& Stream
)

Create a new random seed for a random stream

SelectClass

(
UClass* A,
UClass* B,
bool bSelectA
)

If bPickA is true, A is returned, otherwise B is

FLinearColor

SelectColor

(
FLinearColor A,
FLinearColor B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

float

SelectFloat

(
float A,
float B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

int32

SelectInt

(
int32 A,
int32 B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

UObject *...

SelectObject

(
UObject* A,
UObject* B,
bool bSelectA
)

If bPickA is true, A is returned, otherwise B is

FRotator

SelectRotator

(
FRotator A,
FRotator B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

FString

SelectString

(
const FString& A,
const FString& B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

FTransform

SelectTransform

(
const FTransform& A,
const FTransform& B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

FVector

SelectVector

(
FVector A,
FVector B,
bool bPickA
)

If bPickA is true, A is returned, otherwise B is

void

Set2D

(
FVector2D& A,
float X,
float Y
)

Set the values of the vector directly.

void

SetRandomStreamSeed

(
FRandomStream& Stream,
int32 NewSeed
)

Set the seed of a random stream to a specific number

float

SignOfFloat

(
float A
)

Sign (float, returns -1 if A < 0, 0 if A is zero, and +1 if A > 0)

int32

SignOfInteger

(
int32 A
)

Sign (integer, returns -1 if A < 0, 0 if A is zero, and +1 if A > 0)

int64

SignOfInteger64

(
int64 A
)

Sign (integer64, returns -1 if A < 0, 0 if A is zero, and +1 if A > 0)

float

Sin

(
float A
)

Returns the sine of A (expects Radians)

FVector

Spherical2DToUnitCartesian

(
FVector2D A
)

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

float

Sqrt

(
float A
)

Returns square root of A

float

Square

(
float A
)

Returns square of A (A*A)

uint8

Subtract_ByteByte

(
uint8 A,
uint8 B
)

Subtraction (A - B)

FTimespan

Subtract_DateTimeDateTime

(
FDateTime A,
FDateTime B
)

Subtraction (A - B)

FDateTime

Subtract_DateTimeTimespan

(
FDateTime A,
FTimespan B
)

Subtraction (A - B)

float

Subtract_FloatFloat

(
float A,
float B
)

Subtraction (A - B)

int64

Subtract_Int64Int64

(
int64 A,
int64 B
)

Subtraction (A - B)

int32

Subtract_IntInt

(
int32 A,
int32 B
)

Subtraction (A - B)

FIntPoint

Subtract_IntPointInt

(
FIntPoint A,
int32 B
)

Returns IntPoint A subtracted by B

FIntPoint

Subtract_IntPointIntPoint

(
FIntPoint A,
FIntPoint B
)

Returns IntPoint A subtracted by B

FLinearColor

Subtract_LinearColorLinearColor

Element-wise subtraction of two linear colors (R-R, G-G, B-B, A-A)

FQuat

Subtract_QuatQuat

(
const FQuat& A,
const FQuat& B
)

Returns subtraction of Vector B from Vector A (A - B)

FTimespan

Subtract_TimespanTimespan

(
FTimespan A,
FTimespan B
)

Subtraction (A - B)

FVector2D

Subtract_Vector2DFloat

(
FVector2D A,
float B
)

Returns Vector A subtracted by B

FVector2D

Subtract_Vector2DVector2D

(
FVector2D A,
FVector2D B
)

Returns subtraction of Vector B from Vector A (A - B)

FVector4

Subtract_Vector4Vector4

(
const FVector4& A,
const FVector4& B
)

Returns subtraction of Vector B from Vector A (A - B)

FVector

Subtract_VectorFloat

(
FVector A,
float B
)

Subtracts a float from each component of a vector

FVector

Subtract_VectorInt

(
FVector A,
int32 B
)

Subtracts an integer from each component of a vector

FVector

Subtract_VectorVector

(
FVector A,
FVector B
)

Vector subtraction

float

Tan

(
float A
)

Returns the tan of A (expects Radians)

FTransform

TEase

(
const FTransform& A,
const FTransform& B,
float Alpha,
TEnumAsByte< EEasingFunc::Type > Ea...,
float BlendExp,
int32 Steps
)

Ease between A and B using a specified easing function.

bool

TimespanFromString

(
FString TimespanString,
FTimespan& Result
)

Converts a time span string to a Timespan object

FTimespan

TimespanMaxValue()

Timespan constantsReturns the maximum time span value

FTimespan

TimespanMinValue()

Returns the minimum time span value

float

TimespanRatio

(
FTimespan A,
FTimespan B
)

Returns the ratio between two time spans (A / B), handles zero values

FTimespan

TimespanZeroValue()

Returns a zero time span value

FTransform

TInterpTo

(
const FTransform& Current,
const FTransform& Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target transform based on distance from Current position, giving a nice smooth feeling when tracking a position.

FTransform

TLerp

(
const FTransform& A,
const FTransform& B,
float Alpha,
TEnumAsByte< ELerpInterpolationMode...
)

Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha=1).

FDateTime

Today()

Returns the local date on this computer

void

ToDirectionAndLength2D

(
FVector2D A,
FVector2D& OutDir,
float& OutLength
)

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

FVector2D

ToRounded2D

(
FVector2D A
)

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

FVector2D

ToSign2D

(
FVector2D A
)

Get a copy of the vector as sign only.

float

Transform_Determinant

(
const FTransform& Transform
)

Calculates the determinant of the transform (converts to FMatrix internally)

FVector

TransformDirection

(
const FTransform& T,
FVector Direction
)

Transform a direction vector by the supplied transform - will not change its length.

FVector

TransformLocation

(
const FTransform& T,
FVector Location
)

Transform a position by the supplied transform.

FRotator

TransformRotation

(
const FTransform& T,
FRotator Rotation
)

Transform a rotator by the supplied transform.

FVector4

TransformVector4

(
const FMatrix& Matrix,
const FVector4& Vec4
)

Transform the input vector4 by a provided matrix4x4 and returns the resulting vector4.

FDateTime

UtcNow()

Returns the UTC date and time on this computer

FVector

VEase

(
FVector A,
FVector B,
float Alpha,
TEnumAsByte< EEasingFunc::Type > Ea...,
float BlendExp,
int32 Steps
)

Easing between A and B using a specified easing function

void

(
FVector& A,
)

Add a vector to this and clamp the result to an axis aligned cube centered at the origin.

void

Vector_Assign

(
FVector& A,
const FVector& InVector
)

Assign the values of the supplied vector.

FVector

Vector_Backward()

3D vector Unreal backward direction constant (-1,0,0)

FVector

Vector_BoundedToBox

(
FVector InVect,
FVector InBoxMin,
FVector InBoxMax
)

Get a copy of this vector, clamped inside of the specified axis aligned cube.

FVector

Vector_BoundedToCube

(
FVector InVect,
)

Get a copy of this vector, clamped inside of an axis aligned cube centered at the origin.

FVector

Vector_ClampSize2D

(
FVector A,
float Min,
float Max
)

Create a copy of this vector, with the 2D magnitude/size/length clamped between Min and Max.

FVector

Vector_ClampSizeMax

(
FVector A,
float Max
)

Create a copy of this vector, with its maximum magnitude/size/length clamped to MaxSize.

FVector

Vector_ClampSizeMax2D

(
FVector A,
float Max
)

Create a copy of this vector, with the maximum 2D magnitude/size/length clamped to MaxSize.

FVector

Vector_ComponentMax

(
FVector A,
FVector B
)

Find the maximum elements (X, Y and Z) between the two vector's components

FVector

Vector_ComponentMin

(
FVector A,
FVector B
)

Find the minimum elements (X, Y and Z) between the two vector's components

float

Vector_CosineAngle2D

(
FVector A,
FVector B
)

Returns the cosine of the angle between this vector and another projected onto the XY plane (no Z).

float

Vector_Distance

(
FVector V1,
FVector V2
)

Distance between two points.

float

Vector_Distance2D

(
FVector V1,
FVector V2
)

Euclidean distance between two points in the XY plane (ignoring Z).

float

Vector_Distance2DSquared

(
FVector V1,
FVector V2
)

Squared euclidean distance between two points in the XY plane (ignoring Z).

float

Vector_DistanceSquared

(
FVector V1,
FVector V2
)

Squared distance between two points.

FVector

Vector_Down()

3D vector Unreal down direction constant (0,0,-1)

FVector

Vector_Forward()

3D vector Unreal forward direction constant (1,0,0)

FVector

Vector_GetAbs

(
FVector A
)

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

float

Vector_GetAbsMax

(
FVector A
)

Find the maximum absolute element (abs(X), abs(Y) or abs(Z)) of a vector

float

Vector_GetAbsMin

(
FVector A
)

Find the minimum absolute element (abs(X), abs(Y) or abs(Z)) of a vector

FVector

Vector_GetProjection

(
FVector A
)

Projects 2D components of vector based on Z.

FVector

Vector_GetSignVector

(
FVector A
)

Get a copy of the vector as sign only.

float

(
FVector A
)

Convert a direction vector into a 'heading' angle.

bool

Vector_IsNAN

(
const FVector& A
)

Determines if any component is not a number (NAN)

bool

Vector_IsNearlyZero

(
const FVector& A,
float Tolerance
)

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

bool

Vector_IsNormal

(
const FVector& A
)

Determines if vector is normalized / unit (length 1).

bool

Vector_IsUniform

(
const FVector& A,
float Tolerance
)

Checks whether all components of this vector are the same, within a tolerance.

bool

Vector_IsUnit

(
const FVector& A,
float SquaredLenthTolerance
)

Determines if vector is normalized / unit (length 1) within specified squared tolerance.

bool

Vector_IsZero

(
const FVector& A
)

Checks whether all components of the vector are exactly zero.

FVector

Vector_Left()

3D vector Unreal left direction constant (0,-1,0)

FVector

Vector_MirrorByPlane

(
FVector A,
const FPlane& InPlane
)

Mirrors a vector about a plane.

FVector

Vector_Normal2D

(
FVector A,
float Tolerance
)

Gets a normalized unit copy of the 2D components of the vector, ensuring it is safe to do so.

void

Vector_Normalize

(
FVector& A,
float Tolerance
)

Normalize this vector in-place if it is large enough or set it to (0,0,0) otherwise.

FVector

Vector_NormalUnsafe

(
const FVector& A
)

Calculates normalized unit version of vector without checking for zero length.

FVector

Vector_One()

3D vector one constant (1,1,1)

FVector

Vector_ProjectOnToNormal

(
FVector V,
FVector InNormal
)

Gets a copy of this vector projected onto the input vector, which is assumed to be unit length.

FVector

Vector_Reciprocal

(
const FVector& A
)

Gets the reciprocal of this vector, avoiding division by zero.

FVector

Vector_Right()

3D vector Unreal right direction constant (0,1,0)

void

Vector_Set

(
FVector& A,
float X,
float Y,
float Z
)

Set the values of the vector directly.

FVector

Vector_SnappedToGrid

(
FVector InVect,
float InGridSize
)

Gets a copy of this vector snapped to a grid.

FVector

Vector_ToDegrees

(
FVector A
)

Converts a vector containing radian values to a vector containing degree values.

FVector

(
FVector A
)

Converts a vector containing degree values to a vector containing radian values.

FVector2D

Vector_UnitCartesianToSpherical

(
FVector A
)

Converts a Cartesian unit vector into spherical coordinates on the unit sphere.

void

Vector_UnwindEuler

(
FVector& A
)

When this vector contains Euler angles (degrees), ensure that angles are between +/-180

FVector

Vector_Up()

3D vector Unreal up direction constant (0,0,1)

FVector

Vector_Zero()

Vector (3D) constants - exposed for scripting3D vector zero constant (0,0,0)

FVector2D

Vector2D_One()

Vector2D constants - exposed for scripting2D one vector constant (1,1)

FVector2D

Vector2D_Unit45Deg()

2D unit vector constant along the 45 degree angle or symmetrical positive axes (sqrt(.5),sqrt(.5)) or (.707,.707).

FVector2D

Vector2D_Zero()

2D zero vector constant (0,0)

FVector2D

Vector2DInterpTo

(
FVector2D Current,
FVector2D Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position.

FVector2D

Vector2DInterpTo_Constant

(
FVector2D Current,
FVector2D Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target at a constant rate.

void

Vector4_Assign

(
FVector4& A,
const FVector4& InVector
)

Assign the values of the supplied vector.

FVector4

Vector4_CrossProduct3

(
const FVector4& A,
const FVector4& B
)

Returns the cross product of two vectors - see http://mathworld.wolfram.com/CrossProduct.html

float

Vector4_DotProduct

(
const FVector4& A,
const FVector4& B
)

Returns the dot product of two vectors - see http://mathworld.wolfram.com/DotProduct.html

float

Vector4_DotProduct3

(
const FVector4& A,
const FVector4& B
)

Returns the dot product of two vectors - see http://mathworld.wolfram.com/DotProduct.html The W element is ignored.

bool

Vector4_IsNAN

(
const FVector4& A
)

Determines if any component is not a number (NAN)

bool

Vector4_IsNearlyZero3

(
const FVector4& A,
float Tolerance
)

Checks whether vector is near to zero within a specified tolerance. The W element is ignored.

bool

Vector4_IsNormal3

(
const FVector4& A
)

Determines if vector is normalized / unit (length 1). The W element is ignored.

bool

Vector4_IsUnit3

(
const FVector4& A,
float SquaredLenthTolerance
)

Determines if vector is normalized / unit (length 1) within specified squared tolerance.

bool

Vector4_IsZero

(
const FVector4& A
)

Checks whether all components of the vector are exactly zero.

FVector4

Vector4_MirrorByVector3

(
const FVector4& Direction,
const FVector4& SurfaceNormal
)

Given a direction vector and a surface normal, returns the vector reflected across the surface normal.

FVector4

Vector4_Negated

(
const FVector4& A
)

Gets a negated copy of the vector. Equivalent to -Vector for scripts.

FVector4

Vector4_Normal3

(
const FVector4& A,
float Tolerance
)

Gets a normalized unit copy of the vector, ensuring it is safe to do so based on the length.

void

Vector4_Normalize3

(
FVector4& A,
float Tolerance
)

Normalize this vector in-place if it is large enough or set it to (0,0,0,0) otherwise.

FVector4

Vector4_NormalUnsafe3

(
const FVector4& A
)

Calculates normalized unit version of vector without checking for zero length.

void

Vector4_Set

(
FVector4& A,
float X,
float Y,
float Z,
float W
)

Set the values of the vector directly.

float

Vector4_Size

(
const FVector4& A
)

Returns the length of the vector.

float

Vector4_Size3

(
const FVector4& A
)

Returns the length of the vector. The W element is ignored.

float

Vector4_SizeSquared

(
const FVector4& A
)

Returns the squared length of the vector.

float

Vector4_SizeSquared3

(
const FVector4& A
)

Returns the squared length of the vector. The W element is ignored.

FVector4

Vector4_Zero()

Vector4 constants - exposed for scripting4D vector zero constant (0,0,0)

FVector

VectorSpringInterp

(
FVector Current,
FVector Target,
FVectorSpringState& SpringState,
float Stiffness,
float CriticalDampingFactor,
float DeltaTime,
float Mass
)

Uses a simple spring model to interpolate a vector from Current to Target.

FVector

VInterpTo

(
FVector Current,
FVector Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position.

FVector

VInterpTo_Constant

(
FVector Current,
FVector Target,
float DeltaTime,
float InterpSpeed
)

Tries to reach Target at a constant rate.

FVector

VLerp

(
FVector A,
FVector B,
float Alpha
)

Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha=1)

float

VSize

(
FVector A
)

Returns the length of the vector

float

VSize2D

(
FVector2D A
)

Returns the length of a 2D Vector.

float

VSize2DSquared

(
FVector2D A
)

Returns the squared length of a 2D Vector.

float

VSizeSquared

(
FVector A
)

Returns the squared length of the vector

float

VSizeXY

(
FVector A
)

Returns the length of the vector's XY components.

float

VSizeXYSquared

(
FVector A
)

Returns the squared length of the vector's XY components.

float

WeightedMovingAverage_Float

(
float CurrentSample,
float PreviousSample,
float Weight
)

Calculates the new value in a weighted moving average series using the previous value and the weight

FRotator

WeightedMovingAverage_FRotator

(
FRotator CurrentSample,
FRotator PreviousSample,
float Weight
)

Calculates the new value in a weighted moving average series using the previous value and the weight

FVector

WeightedMovingAverage_FVector

(
FVector CurrentSample,
FVector PreviousSample,
float Weight
)

Calculates the new value in a weighted moving average series using the previous value and the weight

int64

Xor_Int64Int64

(
int64 A,
int64 B
)

Bitwise XOR (A ^ B)

int32

Xor_IntInt

(
int32 A,
int32 B
)

Bitwise XOR (A ^ B)

Deprecated Functions

Name Description

FTransform

ConvertTransformToRelative

(
const FTransform& Transform,
const FTransform& ParentTransform
)

Use MakeRelativeTransform instead, with reversed order of arguments.

float

InverseLerp

(
float A,
float B,
float Value
)