Skip to content

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.

Math / FixedPoint / Constants

Returns the constant 0.0

static FFixedPoint Zero();

Returns the constant 1.0

static FFixedPoint One();

Returns the constant 0.5

static FFixedPoint Half();

Returns the constant 2.0

static FFixedPoint Two();

Returns Pi (3.14159265359)

static FFixedPoint Pi();

Returns 2*Pi (6.28318530718)

static FFixedPoint TwoPi();

Returns Pi/2 (1.57079632679)

static FFixedPoint HalfPi();

Returns Pi/4 (0.78539816339)

static FFixedPoint QuarterPi();

Returns 1/Pi (0.31830988618)

static FFixedPoint InvPi();

Returns 1/(2*Pi) (0.15915494309)

static FFixedPoint InvTwoPi();

Returns Euler’s number e (2.71828182846)

static FFixedPoint E();

Returns log base 2 of e (1.44269504089)

static FFixedPoint Log2E();

Returns log base 10 of e (0.43429448190)

static FFixedPoint Log10E();

Returns natural log of 2 (0.69314718056)

static FFixedPoint Ln2();

Returns natural log of 10 (2.30258509299)

static FFixedPoint Ln10();

Returns square root of 2 (1.41421356237)

static FFixedPoint Sqrt2();

Returns square root of 3 (1.73205080757)

static FFixedPoint Sqrt3();

Returns square root of 0.5 (0.70710678118)

static FFixedPoint SqrtHalf();

Returns 1/sqrt(2) (0.70710678118)

static FFixedPoint InvSqrt2();

Returns 1/sqrt(3) (0.57735026919)

static FFixedPoint InvSqrt3();

Returns the golden ratio (1.61803398875)

static FFixedPoint Phi();

Returns 1 divided by the golden ratio (0.61803398875)

static FFixedPoint InvPhi();

Returns degrees to radians conversion factor (0.01745329252)

static FFixedPoint DegToRad();

Returns radians to degrees conversion factor (57.2957795131)

static FFixedPoint RadToDeg();

The smallest positive value a fixed-point number can hold, 1/2^32 (about 2.3e-10).

static FFixedPoint SmallNumber();

A small tolerance for comparisons, 0.01.

static FFixedPoint KindaSmallNumber();

A very large value: the maximum a fixed-point number can hold, about 2.1 billion.

static FFixedPoint BigNumber();

The default tolerance for equality checks, about 1.5e-7.

static FFixedPoint Epsilon();

The largest value a fixed-point number can hold, about 2.1 billion.

static FFixedPoint MaxFixedValue();

The smallest value a fixed-point number can hold, about -2.1 billion.

static FFixedPoint MinFixedValue();

Returns 1/3 (0.33333333333)

static FFixedPoint Third();

Returns 2/3 (0.66666666667)

static FFixedPoint TwoThirds();

Returns 1/4 (0.25)

static FFixedPoint Quarter();

Returns 3/4 (0.75)

static FFixedPoint ThreeQuarters();

Math / 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

Makes a FixedPoint rational number from a given integer.

static FFixedPoint MakeFixedPointFromInt(int32 IntValue);

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 a FFixedPoint back into its 32.32 integer and fractional halves.

static void BreakFixedPointToParts(FFixedPoint Value, int32& IntegerPortion, int32& FractionPortion);

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);

Converts to an integer, rounding down toward negative infinity: 2.9 gives 2 and -1.5 gives -2.

static int32 FixedPointToInt(FFixedPoint Value);

Converts a FixedPoint to a float for visualization purposes.

static float FixedPointToFloat(FFixedPoint Value);

Adds two FixedPoint values together.

static FFixedPoint Add_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

Subtracts B from A.

static FFixedPoint Subtract_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

Multiplies two FixedPoint values together.

static FFixedPoint Multiply_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

Divides A by B. Dividing by zero returns 0 with a warning.

static FFixedPoint Divide_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

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);

Returns true if A is not equal to B.

static bool NotEqual_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

Returns true if A is less than B.

static bool Less_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

Returns true if A is less than or equal to B.

static bool LessEqual_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

Returns true if A is greater than B.

static bool Greater_FixedPointFixedPoint(FFixedPoint A, FFixedPoint B);

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);

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);

Returns e raised to the power of X (natural exponential function). Valid range approximately -10 to +10.

static FFixedPoint Exp(FFixedPoint X);

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);

Returns the logarithm base 2 of X. X must be greater than 0; otherwise returns 0 with a warning.

static FFixedPoint Log2(FFixedPoint X);

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

Linearly interpolates between A and B based on Alpha (unclamped).

static FFixedPoint Lerp_FixedPoint(FFixedPoint A, FFixedPoint B, FFixedPoint Alpha);

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 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);

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

Creates a FixedVector2D from X and Y components.

static FFixedVector2D MakeFixedVector2D(FFixedPoint X, FFixedPoint Y);

Converts a float Vector2D to a FixedVector2D.

static FFixedVector2D MakeFixedVector2DFromVector2D(FVector2D V);

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);

Subtracts B from A.

static FFixedVector2D Subtract_FixedVector2D(const FFixedVector2D& A, const FFixedVector2D& B);

Multiplies a FixedVector2D by a scalar.

static FFixedVector2D Multiply_FixedVector2DFixedPoint(const FFixedVector2D& V, FFixedPoint Scale);

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);

Returns the dot product of two FixedVector2D vectors.

static FFixedPoint DotProduct2D(const FFixedVector2D& A, const FFixedVector2D& B);

Returns the cross product (2D) of two FixedVector2D vectors.

static FFixedPoint CrossProduct2D(const FFixedVector2D& A, const FFixedVector2D& B);

Returns the length (magnitude) of a FixedVector2D.

static FFixedPoint Size2D(const FFixedVector2D& V);

Returns the squared length of a FixedVector2D (faster than Size).

static FFixedPoint SizeSquared2D(const FFixedVector2D& V);

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);

Returns true if the vector is exactly zero.

static bool IsZero2D(const FFixedVector2D& V);

Returns true if the vector is nearly zero within the specified tolerance.

static bool IsNearlyZero2D(const FFixedVector2D& V, FFixedPoint Tolerance);

Returns the distance between two 2D points.

static FFixedPoint Distance2D(const FFixedVector2D& A, const FFixedVector2D& B);

Returns the squared distance between two 2D points (faster than Distance).

static FFixedPoint DistanceSquared2D(const FFixedVector2D& A, const FFixedVector2D& B);

Linearly interpolates between A and B based on Alpha.

static FFixedVector2D Lerp2D(const FFixedVector2D& A, const FFixedVector2D& B, FFixedPoint Alpha);

Math / FixedVector / Constants

Returns a zero vector (0, 0, 0)

static FFixedVector ZeroVector();

Returns an identity vector (1, 1, 1)

static FFixedVector IdentityVector();

Returns the up vector (0, 0, 1)

static FFixedVector UpVector();

Returns the down vector (0, 0, -1)

static FFixedVector DownVector();

Returns the forward vector (1, 0, 0)

static FFixedVector ForwardVector();

Returns the backward vector (-1, 0, 0)

static FFixedVector BackVector();

Returns the right vector (0, 1, 0)

static FFixedVector RightVector();

Returns the left vector (0, -1, 0)

static FFixedVector LeftVector();

Math / FixedVector

Creates a FixedVector from X, Y, and Z components.

static FFixedVector MakeFixedVector(FFixedPoint X, FFixedPoint Y, FFixedPoint Z);

Converts a float Vector to a FixedVector.

static FFixedVector MakeFixedVectorFromVector(FVector V);

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);

Subtracts B from A.

static FFixedVector Subtract_FixedVector(const FFixedVector& A, const FFixedVector& B);

Multiplies a FixedVector by a scalar.

static FFixedVector Multiply_FixedVectorFixedPoint(const FFixedVector& V, FFixedPoint Scale);

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);

Returns the dot product of two FixedVector vectors.

static FFixedPoint DotProduct(const FFixedVector& A, const FFixedVector& B);

Returns the cross product of two FixedVector vectors.

static FFixedVector CrossProduct(const FFixedVector& A, const FFixedVector& B);

Returns the length (magnitude) of a FixedVector.

static FFixedPoint VectorSize(const FFixedVector& V);

Returns the squared length of a FixedVector (faster than VectorSize).

static FFixedPoint VectorSizeSquared(const FFixedVector& V);

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);

Returns a normalized copy of the vector.

static FFixedVector GetNormalized(const FFixedVector& V, FFixedPoint Tolerance);

Checks if the vector is normalized (has length of 1) within tolerance.

static bool IsNormalized(const FFixedVector& V, FFixedPoint Tolerance);

Returns vector clamped to the specified size range.

static FFixedVector GetClampedToSize(const FFixedVector& V, FFixedPoint Min, FFixedPoint Max);

Returns vector clamped to the specified maximum size.

static FFixedVector GetClampedToMaxSize(const FFixedVector& V, FFixedPoint MaxSize);

Projects vector V onto Target vector.

static FFixedVector ProjectVectorOnTo(const FFixedVector& V, const FFixedVector& Target);

Projects vector V onto Normal (which must be normalized).

static FFixedVector ProjectVectorOnToNormal(const FFixedVector& V, const FFixedVector& Normal);

Returns true if the vector is exactly zero.

static bool IsZeroVector(const FFixedVector& V);

Returns true if the vector is nearly zero within the specified tolerance.

static bool IsNearlyZeroVector(const FFixedVector& V, FFixedPoint Tolerance);

Returns the distance between two points.

static FFixedPoint VectorDistance(const FFixedVector& A, const FFixedVector& B);

Returns the squared distance between two points (faster than VectorDistance).

static FFixedPoint VectorDistanceSquared(const FFixedVector& A, const FFixedVector& B);

Linearly interpolates between A and B based on Alpha.

static FFixedVector VectorLerp(const FFixedVector& A, const FFixedVector& B, FFixedPoint Alpha);

Projects vector V onto the target vector.

static FFixedVector ProjectOnTo(const FFixedVector& V, const FFixedVector& Target);

Clamps the size of a vector to be within the specified range.

static FFixedVector ClampVectorSize(const FFixedVector& V, FFixedPoint Min, FFixedPoint Max);

Returns a vector with the absolute value of each component.

static FFixedVector VectorAbs(const FFixedVector& V);

Math / FixedRotator / Constants

Returns a zero rotator (0, 0, 0)

static FFixedRotator ZeroRotator();

Math / FixedRotator

Creates a FixedRotator from Pitch, Yaw, and Roll components.

static FFixedRotator MakeFixedRotator(FFixedPoint Pitch, FFixedPoint Yaw, FFixedPoint Roll);

Converts a float Rotator to a FixedRotator.

static FFixedRotator MakeFixedRotatorFromRotator(FRotator R);

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);

Subtracts B from A.

static FFixedRotator Subtract_FixedRotator(const FFixedRotator& A, const FFixedRotator& B);

Returns true if the rotator is exactly zero.

static bool IsZeroRotator(const FFixedRotator& R);

Returns a normalized copy of the rotator (angles clamped to valid ranges).

static FFixedRotator GetNormalizedRotator(const FFixedRotator& R);

Returns the forward direction vector for this rotator.

static FFixedVector GetForwardVector(const FFixedRotator& R);

Returns the right direction vector for this rotator.

static FFixedVector GetRightVector(const FFixedRotator& R);

Returns the up direction vector for this rotator.

static FFixedVector GetUpVector(const FFixedRotator& R);

Rotates a vector by this rotator.

static FFixedVector RotateVector(const FFixedRotator& R, const FFixedVector& V);

Unrotates a vector (applies inverse rotation).

static FFixedVector UnrotateVector(const FFixedRotator& R, const FFixedVector& V);

Converts a FixedRotator to a FixedQuaternion.

static FFixedQuaternion RotatorToQuaternion(const FFixedRotator& R);

Converts a FixedQuaternion to a FixedRotator.

static FFixedRotator QuaternionToRotator(const FFixedQuaternion& Q);

Math / FixedQuaternion

Creates a FixedQuaternion from X, Y, Z, and W components.

static FFixedQuaternion MakeFixedQuaternion(FFixedPoint X, FFixedPoint Y, FFixedPoint Z, FFixedPoint W);

Converts a float Quat to a FixedQuaternion.

static FFixedQuaternion MakeFixedQuaternionFromQuat(FQuat Q);

Converts a FixedQuaternion to a float Quat for visualization.

static FQuat FixedQuaternionToQuat(const FFixedQuaternion& Q);

Returns an identity quaternion (no rotation).

static FFixedQuaternion QuaternionIdentity();

Creates a quaternion from Euler angles (Pitch, Yaw, Roll).

static FFixedQuaternion MakeQuaternionFromEuler(const FFixedVector& Euler);

Converts a quaternion to Euler angles (Pitch, Yaw, Roll).

static FFixedVector QuaternionToEuler(const FFixedQuaternion& Q);

Creates a quaternion from an axis and angle (axis should be normalized, angle in radians).

static FFixedQuaternion MakeQuaternionFromAxisAndAngle(const FFixedVector& Axis, FFixedPoint AngleRad);

Multiplies two quaternions together (combines rotations).

static FFixedQuaternion Multiply_QuaternionQuaternion(const FFixedQuaternion& A, const FFixedQuaternion& B);

Rotates a vector by this quaternion.

static FFixedVector QuaternionRotateVector(const FFixedQuaternion& Q, const FFixedVector& V);

Returns the inverse of a quaternion (opposite rotation).

static FFixedQuaternion InverseQuaternion(const FFixedQuaternion& Q);

Returns a normalized copy of the quaternion.

static FFixedQuaternion NormalizeQuaternion(const FFixedQuaternion& Q);

Spherically interpolates between two quaternions.

static FFixedQuaternion SlerpQuaternion(const FFixedQuaternion& A, const FFixedQuaternion& B, FFixedPoint Alpha);

Returns the forward direction vector (X axis) for this quaternion.

static FFixedVector GetQuaternionForwardVector(const FFixedQuaternion& Q);

Returns the right direction vector (Y axis) for this quaternion.

static FFixedVector GetQuaternionRightVector(const FFixedQuaternion& Q);

Returns the up direction vector (Z axis) for this quaternion.

static FFixedVector GetQuaternionUpVector(const FFixedQuaternion& Q);

Returns the X axis direction vector for this quaternion.

static FFixedVector GetQuaternionAxisX(const FFixedQuaternion& Q);

Returns the Y axis direction vector for this quaternion.

static FFixedVector GetQuaternionAxisY(const FFixedQuaternion& Q);

Returns the Z axis direction vector for this quaternion.

static FFixedVector GetQuaternionAxisZ(const FFixedQuaternion& Q);

Math / FixedTransform

Creates a FixedTransform from location, rotation, and scale.

static FFixedTransform MakeFixedTransform(FFixedVector Location, FFixedQuaternion Rotation, FFixedVector Scale);

Creates a FixedTransform from location and rotation (uniform scale of 1).

static FFixedTransform MakeFixedTransformFromTR(FFixedVector Location, FFixedQuaternion Rotation);

Converts a float Transform to a FixedTransform.

static FFixedTransform MakeFixedTransformFromTransform(FTransform T);

Converts a FixedTransform to a float Transform for visualization.

static FTransform FixedTransformToTransform(const FFixedTransform& T);

Returns an identity fixed-point transform (no location, no rotation, scale of 1).

static FFixedTransform IdentityTransform();

Gets the location component of a fixed-point transform.

static FFixedVector GetLocation(const FFixedTransform& T);

Gets the rotation component of a fixed-point transform as a quaternion.

static FFixedQuaternion GetQuaternionRotation(const FFixedTransform& T);

Gets the rotation component of a fixed-point transform.

static FFixedRotator GetRotation(const FFixedTransform& T);

Gets the scale component of a fixed-point transform.

static FFixedVector GetScale(const FFixedTransform& T);

Sets the location component of a fixed-point transform.

static FFixedTransform SetLocation(const FFixedTransform& T, FFixedVector NewLocation);

Sets the rotation component of a fixed-point transform.

static FFixedTransform SetRotation(const FFixedTransform& T, FFixedQuaternion NewRotation);

Sets the scale component of a fixed-point transform.

static FFixedTransform SetScale(const FFixedTransform& T, FFixedVector NewScale);

Transforms a position by the given fixed-point transform.

static FFixedVector TransformPosition(const FFixedTransform& T, const FFixedVector& Position);

Transforms a direction vector by the given fixed-point transform (no location).

static FFixedVector TransformDirection(const FFixedTransform& T, const FFixedVector& Direction);

Inverse transforms a fixed-point position vector. A zero scale component maps to zero.

static FFixedVector InverseTransformPosition(const FFixedTransform& T, const FFixedVector& Position);

Inverse transforms a fixed-point direction vector.

static FFixedVector InverseTransformDirection(const FFixedTransform& T, const FFixedVector& Direction);

Returns the inverse of a fixed-point transform. A zero scale component inverts to zero.

static FFixedTransform InverseTransform(const FFixedTransform& T);

Multiplies two fixed-point transforms together (applies A first, then B).

static FFixedTransform Multiply_TransformTransform(const FFixedTransform& A, const FFixedTransform& B);

Linearly interpolates between two fixed-point transforms.

static FFixedTransform LerpTransform(const FFixedTransform& A, const FFixedTransform& B, FFixedPoint Alpha);

Math / Random

Creates a new RNG with a seed value.

static FFixedRandom MakeRandom(int64 Seed);

Creates a new RNG with default seed.

static FFixedRandom MakeDefaultRandom();

Sets the seed for the random number generator.

static void SetRandomSeed(FFixedRandom& RNG, int64 Seed);

Gets the current RNG state for serialization.

static void GetRandomState(FFixedRandom& RNG, int64& OutState0, int64& OutState1);

Sets the RNG state for deserialization.

static void SetRandomState(FFixedRandom& RNG, int64 InState0, int64 InState1);

Generates a random int32 value.

static void RandomInt(FFixedRandom& RNG, int32& Result);

Generates a random int64 value.

static void RandomInt64(FFixedRandom& RNG, int64& Result);

Draws a random fixed-point value from 0 up to but not including 1.

static void RandomFixedPoint(FFixedRandom& RNG, FFixedPoint& Result);

Generates a random boolean (50/50 chance).

static void RandomBool(FFixedRandom& RNG, bool& Result);

Generates a random boolean with given probability (0 to 1).

static void RandomBoolWithProbability(FFixedRandom& RNG, FFixedPoint Probability, bool& Result);

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);

Generates a random int32 in range [Min, Max] (inclusive).

static void RandomIntRange(FFixedRandom& RNG, int32 Min, int32 Max, int32& Result);

Generates a random 2D point inside a circle.

static void RandomPointInCircle(FFixedRandom& RNG, FFixedVector2D Centre, FFixedPoint Radius, FFixedVector2D& Result);

Generates a random 3D point inside a sphere.

static void RandomPointInSphere(FFixedRandom& RNG, FFixedVector Centre, FFixedPoint Radius, FFixedVector& Result);

Generates a random 2D point inside a rectangle.

static void RandomPointInRect(FFixedRandom& RNG, FFixedVector2D Centre, FFixedVector2D HalfExtents, FFixedVector2D& Result);

Generates a random 3D point inside a box.

static void RandomPointInBox(FFixedRandom& RNG, FFixedVector Centre, FFixedVector HalfExtents, FFixedVector& Result);

Generates a random 2D point inside unit circle.

static void RandomInsideUnitCircle(FFixedRandom& RNG, FFixedVector2D& Result);

Generates a random unit 2D vector.

static void RandomOnUnitCircle(FFixedRandom& RNG, FFixedVector2D& Result);

Generates a random 3D point inside unit sphere.

static void RandomInsideUnitSphere(FFixedRandom& RNG, FFixedVector& Result);

Generates a random unit 3D vector.

static void RandomOnUnitSphere(FFixedRandom& RNG, FFixedVector& Result);

Draws a random angle from 0 to 2 Pi radians.

static void RandomYaw(FFixedRandom& RNG, FFixedPoint& Result);

Draws a random angle from 0 to 2 Pi radians.

static void RandomPitch(FFixedRandom& RNG, FFixedPoint& Result);

Draws a random angle from 0 to 2 Pi radians.

static void RandomRoll(FFixedRandom& RNG, FFixedPoint& Result);

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);