SeinARTS Math Library
Class · USeinMathBPFL : UBlueprintFunctionLibrary
#include "Lib/SeinMathBPFL.h"
deterministic: safe in simulation code
Deterministic fixed-point math for simulation graphs: arithmetic, comparison, trigonometry, vectors, rotators, quaternions, transforms and a seeded random generator. Nodes that convert to or from float are presentation-only, and Blueprint blocks them in simulation graphs.
Blueprint nodes
Section titled “Blueprint nodes”Math / FixedPoint / Constants
Fixed-point Zero
Section titled “Fixed-point Zero”Returns the constant 0.0
static FFixedPoint Zero();Fixed-point One
Section titled “Fixed-point One”Returns the constant 1.0
static FFixedPoint One();Fixed-point Half
Section titled “Fixed-point Half”Returns the constant 0.5
static FFixedPoint Half();Fixed-point Two
Section titled “Fixed-point Two”Returns the constant 2.0
static FFixedPoint Two();Fixed-point Pi
Section titled “Fixed-point Pi”Returns Pi (3.14159265359)
static FFixedPoint Pi();Fixed-point Two Pi
Section titled “Fixed-point Two Pi”Returns 2*Pi (6.28318530718)
static FFixedPoint TwoPi();Fixed-point Half Pi
Section titled “Fixed-point Half Pi”Returns Pi/2 (1.57079632679)
static FFixedPoint HalfPi();Fixed-point Quarter Pi
Section titled “Fixed-point Quarter Pi”Returns Pi/4 (0.78539816339)
static FFixedPoint QuarterPi();Fixed-point Inverse Pi
Section titled “Fixed-point Inverse Pi”Returns 1/Pi (0.31830988618)
static FFixedPoint InvPi();Fixed-point Inverse Two Pi
Section titled “Fixed-point Inverse Two Pi”Returns 1/(2*Pi) (0.15915494309)
static FFixedPoint InvTwoPi();Fixed-point E
Section titled “Fixed-point E”Returns Euler’s number e (2.71828182846)
static FFixedPoint E();Fixed-point Log2(E)
Section titled “Fixed-point Log2(E)”Returns log base 2 of e (1.44269504089)
static FFixedPoint Log2E();Fixed-point Log10(E)
Section titled “Fixed-point Log10(E)”Returns log base 10 of e (0.43429448190)
static FFixedPoint Log10E();Fixed-point Ln(2)
Section titled “Fixed-point Ln(2)”Returns natural log of 2 (0.69314718056)
static FFixedPoint Ln2();Fixed-point Ln(10)
Section titled “Fixed-point Ln(10)”Returns natural log of 10 (2.30258509299)
static FFixedPoint Ln10();Fixed-point Sqrt(2)
Section titled “Fixed-point Sqrt(2)”Returns square root of 2 (1.41421356237)
static FFixedPoint Sqrt2();Fixed-point Sqrt(3)
Section titled “Fixed-point Sqrt(3)”Returns square root of 3 (1.73205080757)
static FFixedPoint Sqrt3();Fixed-point Sqrt(0.5)
Section titled “Fixed-point Sqrt(0.5)”Returns square root of 0.5 (0.70710678118)
static FFixedPoint SqrtHalf();Fixed-point 1/Sqrt(2)
Section titled “Fixed-point 1/Sqrt(2)”Returns 1/sqrt(2) (0.70710678118)
static FFixedPoint InvSqrt2();Fixed-point 1/Sqrt(3)
Section titled “Fixed-point 1/Sqrt(3)”Returns 1/sqrt(3) (0.57735026919)
static FFixedPoint InvSqrt3();Fixed-point Golden Ratio (Phi)
Section titled “Fixed-point Golden Ratio (Phi)”Returns the golden ratio (1.61803398875)
static FFixedPoint Phi();Fixed-point 1/Phi
Section titled “Fixed-point 1/Phi”Returns 1 divided by the golden ratio (0.61803398875)
static FFixedPoint InvPhi();Fixed-point Deg to Rad
Section titled “Fixed-point Deg to Rad”Returns degrees to radians conversion factor (0.01745329252)
static FFixedPoint DegToRad();Fixed-point Rad to Deg
Section titled “Fixed-point Rad to Deg”Returns radians to degrees conversion factor (57.2957795131)
static FFixedPoint RadToDeg();Fixed-point Small Number
Section titled “Fixed-point Small Number”The smallest positive value a fixed-point number can hold, 1/2^32 (about 2.3e-10).
static FFixedPoint SmallNumber();Fixed-point Kinda Small Number
Section titled “Fixed-point Kinda Small Number”A small tolerance for comparisons, 0.01.
static FFixedPoint KindaSmallNumber();Fixed-point Big Number
Section titled “Fixed-point Big Number”A very large value: the maximum a fixed-point number can hold, about 2.1 billion.
static FFixedPoint BigNumber();Fixed-point Epsilon
Section titled “Fixed-point Epsilon”The default tolerance for equality checks, about 1.5e-7.
static FFixedPoint Epsilon();Fixed-point Max Value
Section titled “Fixed-point Max Value”The largest value a fixed-point number can hold, about 2.1 billion.
static FFixedPoint MaxFixedValue();Fixed-point Min Value
Section titled “Fixed-point Min Value”The smallest value a fixed-point number can hold, about -2.1 billion.
static FFixedPoint MinFixedValue();Fixed-point One Third
Section titled “Fixed-point One Third”Returns 1/3 (0.33333333333)
static FFixedPoint Third();Fixed-point Two Thirds
Section titled “Fixed-point Two Thirds”Returns 2/3 (0.66666666667)
static FFixedPoint TwoThirds();Fixed-point One Quarter
Section titled “Fixed-point One Quarter”Returns 1/4 (0.25)
static FFixedPoint Quarter();Fixed-point Three Quarters
Section titled “Fixed-point Three Quarters”Returns 3/4 (0.75)
static FFixedPoint ThreeQuarters();Math / Curve
Sample Fixed Curve
Section titled “Sample Fixed Curve”Reads the curve at Input. Each key uses its own interpolation (constant, linear or cubic), the end values are held outside the first and last keys, and an empty curve returns 0. Deterministic, so use it for tuning curves such as throttle falloff or turn rate versus speed.
static FFixedPoint SeinSampleFixedCurve(const FFixedCurve& Curve, FFixedPoint Input);Math / FixedPoint
Make FixedPoint from Int
Section titled “Make FixedPoint from Int”Makes a FixedPoint rational number from a given integer.
static FFixedPoint MakeFixedPointFromInt(int32 IntValue);Make FixedPoint
Section titled “Make FixedPoint”Builds a fixed-point number from its two 32-bit halves. Integer Portion is the whole part, and Fraction Portion is the fraction as a raw 32-bit value, so 0x80000000 (-2147483648 as a signed integer) is exactly 0.5. No float is involved, so the result is identical on every platform.
static FFixedPoint MakeFixedPointFromParts(int32 IntegerPortion, int32 FractionPortion);Break FixedPoint
Section titled “Break FixedPoint”Break a FFixedPoint back into its 32.32 integer and fractional halves.
static void BreakFixedPointToParts(FFixedPoint Value, int32& IntegerPortion, int32& FractionPortion);Make FixedPoint from Float
Section titled “Make FixedPoint from Float”Converts a float to fixed point. The conversion can lose precision and is not deterministic, so it is presentation-only and blocked in simulation graphs. For exact values use Make FixedPoint.
static FFixedPoint MakeFixedPointFromFloat(float FloatValue);To Int
Section titled “To Int”Converts to an integer, rounding down toward negative infinity: 2.9 gives 2 and -1.5 gives -2.
static int32 FixedPointToInt(FFixedPoint Value);To Float
Section titled “To Float”Converts a FixedPoint to a float for visualization purposes.
static float FixedPointToFloat(FFixedPoint Value);Add (Fixed-point)
Section titled “Add (Fixed-point)”Adds two FixedPoint values together.
static FFixedPoint Add_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Subtract (Fixed-point)
Section titled “Subtract (Fixed-point)”Subtracts B from A.
static FFixedPoint Subtract_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Multiply
Section titled “Multiply”Multiplies two FixedPoint values together.
static FFixedPoint Multiply_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Divide
Section titled “Divide”Divides A by B. Dividing by zero returns 0 with a warning.
static FFixedPoint Divide_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Negate
Section titled “Negate”Negates a FixedPoint value (returns -A).
static FFixedPoint Negate_FixedPoint(FFixedPoint A);Returns true if A is exactly equal to B.
static bool EqualEqual_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Not Equal
Section titled “Not Equal”Returns true if A is not equal to B.
static bool NotEqual_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Less Than
Section titled “Less Than”Returns true if A is less than B.
static bool Less_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Less Than or Equal
Section titled “Less Than or Equal”Returns true if A is less than or equal to B.
static bool LessEqual_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Greater Than
Section titled “Greater Than”Returns true if A is greater than B.
static bool Greater_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Greater Than or Equal
Section titled “Greater Than or Equal”Returns true if A is greater than or equal to B.
static bool GreaterEqual_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);Returns the square root of X using deterministic fixed-point arithmetic. A negative X returns 0 with a warning.
static FFixedPoint Sqrt(FFixedPoint X);Returns the absolute value of X.
static FFixedPoint Abs(FFixedPoint X);Returns the minimum of A and B.
static FFixedPoint Min(FFixedPoint A, FFixedPoint B);Returns the maximum of A and B.
static FFixedPoint Max(FFixedPoint A, FFixedPoint B);Clamps Value to be between Min and Max (inclusive).
static FFixedPoint Clamp(FFixedPoint Value, FFixedPoint Min, FFixedPoint Max);Returns the sign of X (-1, 0, or 1).
static FFixedPoint Sign(FFixedPoint X);Rounds X down to the nearest integer.
static FFixedPoint Floor(FFixedPoint X);Rounds X up to the nearest integer.
static FFixedPoint Ceil(FFixedPoint X);Rounds X to the nearest integer (0.5 rounds up).
static FFixedPoint Round(FFixedPoint X);Returns the remainder of X divided by Y, with the sign of Y, so Mod(-1, 3) is 2. A Y of zero returns 0.
static FFixedPoint Mod(FFixedPoint X, FFixedPoint Y);Returns X minus Floor(X), so the result is from 0 up to but not including 1, even for negative X.
static FFixedPoint Frac(FFixedPoint X);Is Nearly Equal Fixed Point
Section titled “Is Nearly Equal Fixed Point”Checks if two FixedPoint values are nearly equal within a given tolerance.
static bool IsNearlyEqual_FixedPoint(FFixedPoint A, FFixedPoint B, FFixedPoint Tolerance);Raises Base to the power of Exponent. Example: Pow(2, 3) = 8. Zero to a negative power returns 0 with a warning.
static FFixedPoint Pow(FFixedPoint Base, int32 Exponent);Exp (e^X)
Section titled “Exp (e^X)”Returns e raised to the power of X (natural exponential function). Valid range approximately -10 to +10.
static FFixedPoint Exp(FFixedPoint X);Natural Log (ln)
Section titled “Natural Log (ln)”Returns the natural logarithm of X (base e). X must be greater than 0; otherwise returns 0 with a warning.
static FFixedPoint Log(FFixedPoint X);Log Base 2
Section titled “Log Base 2”Returns the logarithm base 2 of X. X must be greater than 0; otherwise returns 0 with a warning.
static FFixedPoint Log2(FFixedPoint X);Log Base 10
Section titled “Log Base 10”Returns the logarithm base 10 of X. X must be greater than 0; otherwise returns 0 with a warning.
static FFixedPoint Log10(FFixedPoint X);Math / Interpolation
Lerp Fixed Point
Section titled “Lerp Fixed Point”Linearly interpolates between A and B based on Alpha (unclamped).
static FFixedPoint Lerp_FixedPoint(FFixedPoint A, FFixedPoint B, FFixedPoint Alpha);Inverse Lerp
Section titled “Inverse Lerp”Finds the Alpha that gives Value between A and B: (Value - A) / (B - A). Returns 0 when A equals B.
static FFixedPoint InverseLerp(FFixedPoint A, FFixedPoint B, FFixedPoint Value);Smooth Step
Section titled “Smooth Step”Smooth Hermite interpolation between A and B (cubic ease in/out). Alpha is clamped to [0,1].
static FFixedPoint SmoothStep(FFixedPoint A, FFixedPoint B, FFixedPoint Alpha);Math / Trigonometry
Returns the sine of Radians using a deterministic lookup table.
static FFixedPoint Sin(FFixedPoint Radians);Returns the cosine of Radians using a deterministic lookup table.
static FFixedPoint Cos(FFixedPoint Radians);Returns the tangent of Radians. Where the tangent is undefined it returns the maximum fixed-point value.
static FFixedPoint Tan(FFixedPoint Radians);Returns the arcsine of X in radians. X should be in the range [-1, 1].
static FFixedPoint Asin(FFixedPoint X);Returns the arccosine of X in radians. X should be in the range [-1, 1].
static FFixedPoint Acos(FFixedPoint X);Returns the arctangent of X in radians.
static FFixedPoint Atan(FFixedPoint X);Atan 2
Section titled “Atan 2”Returns the arctangent of Y/X in radians, using the signs of both to determine the quadrant.
static FFixedPoint Atan2(FFixedPoint Y, FFixedPoint X);Math / FixedVector2D
Make FixedVector2D
Section titled “Make FixedVector2D”Creates a FixedVector2D from X and Y components.
static FFixedVector2D MakeFixedVector2D(FFixedPoint X, FFixedPoint Y);From Vector2D
Section titled “From Vector2D”Converts a float Vector2D to a FixedVector2D.
static FFixedVector2D MakeFixedVector2DFromVector2D(FVector2D V);To Vector2D
Section titled “To Vector2D”Converts a FixedVector2D to a float Vector2D for visualization.
static FVector2D FixedVector2DToVector2D(const FFixedVector2D& V);Adds two FixedVector2D vectors together.
static FFixedVector2D Add_FixedVector2D(const FFixedVector2D& A, const FFixedVector2D& B);Subtract
Section titled “Subtract”Subtracts B from A.
static FFixedVector2D Subtract_FixedVector2D(const FFixedVector2D& A, const FFixedVector2D& B);Multiply
Section titled “Multiply”Multiplies a FixedVector2D by a scalar.
static FFixedVector2D Multiply_FixedVector2DFixedPoint(const FFixedVector2D& V, FFixedPoint Scale);Divide
Section titled “Divide”Divides a FixedVector2D by a scalar. Dividing by zero returns a zero vector with a warning.
static FFixedVector2D Divide_FixedVector2DFixedPoint(const FFixedVector2D& V, FFixedPoint Divisor);Dot Product
Section titled “Dot Product”Returns the dot product of two FixedVector2D vectors.
static FFixedPoint DotProduct2D(const FFixedVector2D& A, const FFixedVector2D& B);Cross Product 2 D
Section titled “Cross Product 2 D”Returns the cross product (2D) of two FixedVector2D vectors.
static FFixedPoint CrossProduct2D(const FFixedVector2D& A, const FFixedVector2D& B);Size 2 D
Section titled “Size 2 D”Returns the length (magnitude) of a FixedVector2D.
static FFixedPoint Size2D(const FFixedVector2D& V);Size Squared 2 D
Section titled “Size Squared 2 D”Returns the squared length of a FixedVector2D (faster than Size).
static FFixedPoint SizeSquared2D(const FFixedVector2D& V);Get Safe Normal 2 D
Section titled “Get Safe Normal 2 D”Returns a normalized copy of the vector if safe to do so, otherwise returns a zero vector.
static FFixedVector2D GetSafeNormal2D(const FFixedVector2D& V, FFixedPoint Tolerance);Is Zero 2 D
Section titled “Is Zero 2 D”Returns true if the vector is exactly zero.
static bool IsZero2D(const FFixedVector2D& V);Is Nearly Zero 2 D
Section titled “Is Nearly Zero 2 D”Returns true if the vector is nearly zero within the specified tolerance.
static bool IsNearlyZero2D(const FFixedVector2D& V, FFixedPoint Tolerance);Distance 2 D
Section titled “Distance 2 D”Returns the distance between two 2D points.
static FFixedPoint Distance2D(const FFixedVector2D& A, const FFixedVector2D& B);Distance Squared 2 D
Section titled “Distance Squared 2 D”Returns the squared distance between two 2D points (faster than Distance).
static FFixedPoint DistanceSquared2D(const FFixedVector2D& A, const FFixedVector2D& B);Lerp 2 D
Section titled “Lerp 2 D”Linearly interpolates between A and B based on Alpha.
static FFixedVector2D Lerp2D(const FFixedVector2D& A, const FFixedVector2D& B, FFixedPoint Alpha);Math / FixedVector / Constants
Zero Vector
Section titled “Zero Vector”Returns a zero vector (0, 0, 0)
static FFixedVector ZeroVector();One Vector
Section titled “One Vector”Returns an identity vector (1, 1, 1)
static FFixedVector IdentityVector();Up Vector
Section titled “Up Vector”Returns the up vector (0, 0, 1)
static FFixedVector UpVector();Down Vector
Section titled “Down Vector”Returns the down vector (0, 0, -1)
static FFixedVector DownVector();Forward Vector
Section titled “Forward Vector”Returns the forward vector (1, 0, 0)
static FFixedVector ForwardVector();Backward Vector
Section titled “Backward Vector”Returns the backward vector (-1, 0, 0)
static FFixedVector BackVector();Right Vector
Section titled “Right Vector”Returns the right vector (0, 1, 0)
static FFixedVector RightVector();Left Vector
Section titled “Left Vector”Returns the left vector (0, -1, 0)
static FFixedVector LeftVector();Math / FixedVector
Make FixedVector
Section titled “Make FixedVector”Creates a FixedVector from X, Y, and Z components.
static FFixedVector MakeFixedVector(FFixedPoint X, FFixedPoint Y, FFixedPoint Z);From Vector
Section titled “From Vector”Converts a float Vector to a FixedVector.
static FFixedVector MakeFixedVectorFromVector(FVector V);To Vector
Section titled “To Vector”Converts a FixedVector to a float Vector for visualization.
static FVector FixedVectorToVector(const FFixedVector& V);Adds two FixedVector vectors together.
static FFixedVector Add_FixedVector(const FFixedVector& A, const FFixedVector& B);Subtract
Section titled “Subtract”Subtracts B from A.
static FFixedVector Subtract_FixedVector(const FFixedVector& A, const FFixedVector& B);Multiply
Section titled “Multiply”Multiplies a FixedVector by a scalar.
static FFixedVector Multiply_FixedVectorFixedPoint(const FFixedVector& V, FFixedPoint Scale);Divide
Section titled “Divide”Divides a FixedVector by a scalar. Dividing by zero returns a zero vector with a warning.
static FFixedVector Divide_FixedVectorFixedPoint(const FFixedVector& V, FFixedPoint Divisor);Dot Product
Section titled “Dot Product”Returns the dot product of two FixedVector vectors.
static FFixedPoint DotProduct(const FFixedVector& A, const FFixedVector& B);Cross Product
Section titled “Cross Product”Returns the cross product of two FixedVector vectors.
static FFixedVector CrossProduct(const FFixedVector& A, const FFixedVector& B);Vector Size
Section titled “Vector Size”Returns the length (magnitude) of a FixedVector.
static FFixedPoint VectorSize(const FFixedVector& V);Vector Size Squared
Section titled “Vector Size Squared”Returns the squared length of a FixedVector (faster than VectorSize).
static FFixedPoint VectorSizeSquared(const FFixedVector& V);Get Safe Normal
Section titled “Get Safe Normal”Returns a normalized copy of the vector if safe to do so, otherwise returns a zero vector.
static FFixedVector GetSafeNormal(const FFixedVector& V, FFixedPoint Tolerance);Get Normalized
Section titled “Get Normalized”Returns a normalized copy of the vector.
static FFixedVector GetNormalized(const FFixedVector& V, FFixedPoint Tolerance);Is Normalized
Section titled “Is Normalized”Checks if the vector is normalized (has length of 1) within tolerance.
static bool IsNormalized(const FFixedVector& V, FFixedPoint Tolerance);Get Clamped To Size
Section titled “Get Clamped To Size”Returns vector clamped to the specified size range.
static FFixedVector GetClampedToSize(const FFixedVector& V, FFixedPoint Min, FFixedPoint Max);Get Clamped To Max Size
Section titled “Get Clamped To Max Size”Returns vector clamped to the specified maximum size.
static FFixedVector GetClampedToMaxSize(const FFixedVector& V, FFixedPoint MaxSize);Project Vector Onto
Section titled “Project Vector Onto”Projects vector V onto Target vector.
static FFixedVector ProjectVectorOnTo(const FFixedVector& V, const FFixedVector& Target);Project Vector Onto Normal
Section titled “Project Vector Onto Normal”Projects vector V onto Normal (which must be normalized).
static FFixedVector ProjectVectorOnToNormal(const FFixedVector& V, const FFixedVector& Normal);Is Zero Vector
Section titled “Is Zero Vector”Returns true if the vector is exactly zero.
static bool IsZeroVector(const FFixedVector& V);Is Nearly Zero Vector
Section titled “Is Nearly Zero Vector”Returns true if the vector is nearly zero within the specified tolerance.
static bool IsNearlyZeroVector(const FFixedVector& V, FFixedPoint Tolerance);Vector Distance
Section titled “Vector Distance”Returns the distance between two points.
static FFixedPoint VectorDistance(const FFixedVector& A, const FFixedVector& B);Vector Distance Squared
Section titled “Vector Distance Squared”Returns the squared distance between two points (faster than VectorDistance).
static FFixedPoint VectorDistanceSquared(const FFixedVector& A, const FFixedVector& B);Vector Lerp
Section titled “Vector Lerp”Linearly interpolates between A and B based on Alpha.
static FFixedVector VectorLerp(const FFixedVector& A, const FFixedVector& B, FFixedPoint Alpha);Project On To
Section titled “Project On To”Projects vector V onto the target vector.
static FFixedVector ProjectOnTo(const FFixedVector& V, const FFixedVector& Target);Clamp Vector Size
Section titled “Clamp Vector Size”Clamps the size of a vector to be within the specified range.
static FFixedVector ClampVectorSize(const FFixedVector& V, FFixedPoint Min, FFixedPoint Max);Vector Abs
Section titled “Vector Abs”Returns a vector with the absolute value of each component.
static FFixedVector VectorAbs(const FFixedVector& V);Math / FixedRotator / Constants
Zero Rotator
Section titled “Zero Rotator”Returns a zero rotator (0, 0, 0)
static FFixedRotator ZeroRotator();Math / FixedRotator
Make FixedRotator
Section titled “Make FixedRotator”Creates a FixedRotator from Pitch, Yaw, and Roll components.
static FFixedRotator MakeFixedRotator(FFixedPoint Pitch, FFixedPoint Yaw, FFixedPoint Roll);From Rotator
Section titled “From Rotator”Converts a float Rotator to a FixedRotator.
static FFixedRotator MakeFixedRotatorFromRotator(FRotator R);To Rotator
Section titled “To Rotator”Converts a FixedRotator to a float Rotator for visualization.
static FRotator FixedRotatorToRotator(const FFixedRotator& R);Adds two FixedRotator rotations together.
static FFixedRotator Add_FixedRotator(const FFixedRotator& A, const FFixedRotator& B);Subtract
Section titled “Subtract”Subtracts B from A.
static FFixedRotator Subtract_FixedRotator(const FFixedRotator& A, const FFixedRotator& B);Is Zero Rotator
Section titled “Is Zero Rotator”Returns true if the rotator is exactly zero.
static bool IsZeroRotator(const FFixedRotator& R);Get Normalized Rotator
Section titled “Get Normalized Rotator”Returns a normalized copy of the rotator (angles clamped to valid ranges).
static FFixedRotator GetNormalizedRotator(const FFixedRotator& R);Get Forward Vector
Section titled “Get Forward Vector”Returns the forward direction vector for this rotator.
static FFixedVector GetForwardVector(const FFixedRotator& R);Get Right Vector
Section titled “Get Right Vector”Returns the right direction vector for this rotator.
static FFixedVector GetRightVector(const FFixedRotator& R);Get Up Vector
Section titled “Get Up Vector”Returns the up direction vector for this rotator.
static FFixedVector GetUpVector(const FFixedRotator& R);Rotate Vector
Section titled “Rotate Vector”Rotates a vector by this rotator.
static FFixedVector RotateVector(const FFixedRotator& R, const FFixedVector& V);Unrotate Vector
Section titled “Unrotate Vector”Unrotates a vector (applies inverse rotation).
static FFixedVector UnrotateVector(const FFixedRotator& R, const FFixedVector& V);Rotator To Quaternion
Section titled “Rotator To Quaternion”Converts a FixedRotator to a FixedQuaternion.
static FFixedQuaternion RotatorToQuaternion(const FFixedRotator& R);Quaternion To Rotator
Section titled “Quaternion To Rotator”Converts a FixedQuaternion to a FixedRotator.
static FFixedRotator QuaternionToRotator(const FFixedQuaternion& Q);Math / FixedQuaternion
Make FixedQuaternion
Section titled “Make FixedQuaternion”Creates a FixedQuaternion from X, Y, Z, and W components.
static FFixedQuaternion MakeFixedQuaternion(FFixedPoint X, FFixedPoint Y, FFixedPoint Z, FFixedPoint W);From Quat
Section titled “From Quat”Converts a float Quat to a FixedQuaternion.
static FFixedQuaternion MakeFixedQuaternionFromQuat(FQuat Q);To Quat
Section titled “To Quat”Converts a FixedQuaternion to a float Quat for visualization.
static FQuat FixedQuaternionToQuat(const FFixedQuaternion& Q);Quaternion Identity
Section titled “Quaternion Identity”Returns an identity quaternion (no rotation).
static FFixedQuaternion QuaternionIdentity();Make Quaternion From Euler
Section titled “Make Quaternion From Euler”Creates a quaternion from Euler angles (Pitch, Yaw, Roll).
static FFixedQuaternion MakeQuaternionFromEuler(const FFixedVector& Euler);Quaternion To Euler
Section titled “Quaternion To Euler”Converts a quaternion to Euler angles (Pitch, Yaw, Roll).
static FFixedVector QuaternionToEuler(const FFixedQuaternion& Q);Make Quaternion From Axis And Angle
Section titled “Make Quaternion From Axis And Angle”Creates a quaternion from an axis and angle (axis should be normalized, angle in radians).
static FFixedQuaternion MakeQuaternionFromAxisAndAngle(const FFixedVector& Axis, FFixedPoint AngleRad);Multiply
Section titled “Multiply”Multiplies two quaternions together (combines rotations).
static FFixedQuaternion Multiply_QuaternionQuaternion(const FFixedQuaternion& A, const FFixedQuaternion& B);Quaternion Rotate Vector
Section titled “Quaternion Rotate Vector”Rotates a vector by this quaternion.
static FFixedVector QuaternionRotateVector(const FFixedQuaternion& Q, const FFixedVector& V);Inverse Quaternion
Section titled “Inverse Quaternion”Returns the inverse of a quaternion (opposite rotation).
static FFixedQuaternion InverseQuaternion(const FFixedQuaternion& Q);Normalize Quaternion
Section titled “Normalize Quaternion”Returns a normalized copy of the quaternion.
static FFixedQuaternion NormalizeQuaternion(const FFixedQuaternion& Q);Slerp Quaternion
Section titled “Slerp Quaternion”Spherically interpolates between two quaternions.
static FFixedQuaternion SlerpQuaternion(const FFixedQuaternion& A, const FFixedQuaternion& B, FFixedPoint Alpha);Get Quaternion Forward Vector
Section titled “Get Quaternion Forward Vector”Returns the forward direction vector (X axis) for this quaternion.
static FFixedVector GetQuaternionForwardVector(const FFixedQuaternion& Q);Get Quaternion Right Vector
Section titled “Get Quaternion Right Vector”Returns the right direction vector (Y axis) for this quaternion.
static FFixedVector GetQuaternionRightVector(const FFixedQuaternion& Q);Get Quaternion Up Vector
Section titled “Get Quaternion Up Vector”Returns the up direction vector (Z axis) for this quaternion.
static FFixedVector GetQuaternionUpVector(const FFixedQuaternion& Q);Get Quaternion Axis X
Section titled “Get Quaternion Axis X”Returns the X axis direction vector for this quaternion.
static FFixedVector GetQuaternionAxisX(const FFixedQuaternion& Q);Get Quaternion Axis Y
Section titled “Get Quaternion Axis Y”Returns the Y axis direction vector for this quaternion.
static FFixedVector GetQuaternionAxisY(const FFixedQuaternion& Q);Get Quaternion Axis Z
Section titled “Get Quaternion Axis Z”Returns the Z axis direction vector for this quaternion.
static FFixedVector GetQuaternionAxisZ(const FFixedQuaternion& Q);Math / FixedTransform
Make Fixed-point Transform
Section titled “Make Fixed-point Transform”Creates a FixedTransform from location, rotation, and scale.
static FFixedTransform MakeFixedTransform(FFixedVector Location, FFixedQuaternion Rotation, FFixedVector Scale);Make Fixed-point Transform (T+R)
Section titled “Make Fixed-point Transform (T+R)”Creates a FixedTransform from location and rotation (uniform scale of 1).
static FFixedTransform MakeFixedTransformFromTR(FFixedVector Location, FFixedQuaternion Rotation);From Transform
Section titled “From Transform”Converts a float Transform to a FixedTransform.
static FFixedTransform MakeFixedTransformFromTransform(FTransform T);To Transform
Section titled “To Transform”Converts a FixedTransform to a float Transform for visualization.
static FTransform FixedTransformToTransform(const FFixedTransform& T);Identity Transform
Section titled “Identity Transform”Returns an identity fixed-point transform (no location, no rotation, scale of 1).
static FFixedTransform IdentityTransform();Get Location
Section titled “Get Location”Gets the location component of a fixed-point transform.
static FFixedVector GetLocation(const FFixedTransform& T);Get Quaternion Rotation
Section titled “Get Quaternion Rotation”Gets the rotation component of a fixed-point transform as a quaternion.
static FFixedQuaternion GetQuaternionRotation(const FFixedTransform& T);Get Rotation
Section titled “Get Rotation”Gets the rotation component of a fixed-point transform.
static FFixedRotator GetRotation(const FFixedTransform& T);Get Scale
Section titled “Get Scale”Gets the scale component of a fixed-point transform.
static FFixedVector GetScale(const FFixedTransform& T);Set Location
Section titled “Set Location”Sets the location component of a fixed-point transform.
static FFixedTransform SetLocation(const FFixedTransform& T, FFixedVector NewLocation);Set Rotation
Section titled “Set Rotation”Sets the rotation component of a fixed-point transform.
static FFixedTransform SetRotation(const FFixedTransform& T, FFixedQuaternion NewRotation);Set Scale
Section titled “Set Scale”Sets the scale component of a fixed-point transform.
static FFixedTransform SetScale(const FFixedTransform& T, FFixedVector NewScale);Transform Position
Section titled “Transform Position”Transforms a position by the given fixed-point transform.
static FFixedVector TransformPosition(const FFixedTransform& T, const FFixedVector& Position);Transform Direction
Section titled “Transform Direction”Transforms a direction vector by the given fixed-point transform (no location).
static FFixedVector TransformDirection(const FFixedTransform& T, const FFixedVector& Direction);Inverse Transform Position
Section titled “Inverse Transform Position”Inverse transforms a fixed-point position vector. A zero scale component maps to zero.
static FFixedVector InverseTransformPosition(const FFixedTransform& T, const FFixedVector& Position);Inverse Transform Direction
Section titled “Inverse Transform Direction”Inverse transforms a fixed-point direction vector.
static FFixedVector InverseTransformDirection(const FFixedTransform& T, const FFixedVector& Direction);Inverse Transform
Section titled “Inverse Transform”Returns the inverse of a fixed-point transform. A zero scale component inverts to zero.
static FFixedTransform InverseTransform(const FFixedTransform& T);Multiply
Section titled “Multiply”Multiplies two fixed-point transforms together (applies A first, then B).
static FFixedTransform Multiply_TransformTransform(const FFixedTransform& A, const FFixedTransform& B);Lerp Transform
Section titled “Lerp Transform”Linearly interpolates between two fixed-point transforms.
static FFixedTransform LerpTransform(const FFixedTransform& A, const FFixedTransform& B, FFixedPoint Alpha);Math / Random
Make Random
Section titled “Make Random”Creates a new RNG with a seed value.
static FFixedRandom MakeRandom(int64 Seed);Make Default Random
Section titled “Make Default Random”Creates a new RNG with default seed.
static FFixedRandom MakeDefaultRandom();Set Random Seed
Section titled “Set Random Seed”Sets the seed for the random number generator.
static void SetRandomSeed(FFixedRandom& RNG, int64 Seed);Get Random State
Section titled “Get Random State”Gets the current RNG state for serialization.
static void GetRandomState(FFixedRandom& RNG, int64& OutState0, int64& OutState1);Set Random State (Deterministic)
Section titled “Set Random State (Deterministic)”Sets the RNG state for deserialization.
static void SetRandomState(FFixedRandom& RNG, int64 InState0, int64 InState1);Random Int
Section titled “Random Int”Generates a random int32 value.
static void RandomInt(FFixedRandom& RNG, int32& Result);Random Int64
Section titled “Random Int64”Generates a random int64 value.
static void RandomInt64(FFixedRandom& RNG, int64& Result);Random Fixed Point
Section titled “Random Fixed Point”Draws a random fixed-point value from 0 up to but not including 1.
static void RandomFixedPoint(FFixedRandom& RNG, FFixedPoint& Result);Random Bool
Section titled “Random Bool”Generates a random boolean (50/50 chance).
static void RandomBool(FFixedRandom& RNG, bool& Result);Random Bool With Probability
Section titled “Random Bool With Probability”Generates a random boolean with given probability (0 to 1).
static void RandomBoolWithProbability(FFixedRandom& RNG, FFixedPoint Probability, bool& Result);Random Range
Section titled “Random Range”Draws a random fixed-point value from Min up to but not including Max. Returns Min if Min is not below Max.
static void RandomRange(FFixedRandom& RNG, FFixedPoint Min, FFixedPoint Max, FFixedPoint& Result);Random Int Range
Section titled “Random Int Range”Generates a random int32 in range [Min, Max] (inclusive).
static void RandomIntRange(FFixedRandom& RNG, int32 Min, int32 Max, int32& Result);Random Point In Circle
Section titled “Random Point In Circle”Generates a random 2D point inside a circle.
static void RandomPointInCircle(FFixedRandom& RNG, FFixedVector2D Centre, FFixedPoint Radius, FFixedVector2D& Result);Random Point In Sphere
Section titled “Random Point In Sphere”Generates a random 3D point inside a sphere.
static void RandomPointInSphere(FFixedRandom& RNG, FFixedVector Centre, FFixedPoint Radius, FFixedVector& Result);Random Point In Rect
Section titled “Random Point In Rect”Generates a random 2D point inside a rectangle.
static void RandomPointInRect(FFixedRandom& RNG, FFixedVector2D Centre, FFixedVector2D HalfExtents, FFixedVector2D& Result);Random Point In Box
Section titled “Random Point In Box”Generates a random 3D point inside a box.
static void RandomPointInBox(FFixedRandom& RNG, FFixedVector Centre, FFixedVector HalfExtents, FFixedVector& Result);Random Inside Unit Circle
Section titled “Random Inside Unit Circle”Generates a random 2D point inside unit circle.
static void RandomInsideUnitCircle(FFixedRandom& RNG, FFixedVector2D& Result);Random On Unit Circle
Section titled “Random On Unit Circle”Generates a random unit 2D vector.
static void RandomOnUnitCircle(FFixedRandom& RNG, FFixedVector2D& Result);Random Inside Unit Sphere
Section titled “Random Inside Unit Sphere”Generates a random 3D point inside unit sphere.
static void RandomInsideUnitSphere(FFixedRandom& RNG, FFixedVector& Result);Random On Unit Sphere
Section titled “Random On Unit Sphere”Generates a random unit 3D vector.
static void RandomOnUnitSphere(FFixedRandom& RNG, FFixedVector& Result);Random Yaw
Section titled “Random Yaw”Draws a random angle from 0 to 2 Pi radians.
static void RandomYaw(FFixedRandom& RNG, FFixedPoint& Result);Random Pitch
Section titled “Random Pitch”Draws a random angle from 0 to 2 Pi radians.
static void RandomPitch(FFixedRandom& RNG, FFixedPoint& Result);Random Roll
Section titled “Random Roll”Draws a random angle from 0 to 2 Pi radians.
static void RandomRoll(FFixedRandom& RNG, FFixedPoint& Result);Random Rotator
Section titled “Random Rotator”Draws a random rotator with random pitch, yaw and roll. The angles are in degrees, as in every fixed rotator.
static void RandomRotator(FFixedRandom& RNG, FFixedRotator& Result);