MMathStatics
- Module
- Game
- Header
#include "Game/MMathStatics.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Public functions
| Returns | Name | Description |
|---|---|---|
float | FInterpTo | A non-positive speed snaps to the target (UE's convention). |
Vec3 | VInterpTo | |
float | FInterpConstantTo | Constant-rate approach — moves at interpSpeed units per second and never overshoots. |
float | AngleInterpTo | Shortest-path angular approach, so easing 350° toward 10° goes forward through 0 instead of the long way round. |
float | MapRange | Re-ranges a value; a zero-width input range returns outMin rather than dividing by zero. |
float | NormalizeAngle | Wraps to (-180, 180]. |
float | DeltaAngle | Signed shortest rotation from one angle to the other, in (-180, 180]. |
float | AngleBetween | Unsigned angle between two directions, in [0, 180]. |
float | DotProduct | |
Vec3 | CrossProduct | |
float | VectorLength | |
Vec3 | NormalizeVector | |
Vec3 | VectorLerp | |
Vec3 | DirectionBetween | Unit vector from one point toward another; zero when they coincide. |
Vec3 | RotationFromDirection | Euler degrees that face direction (the rotation form of a look-at), and its inverse. |
Vec3 | DirectionFromRotation | |
Vec3 | RandomPointInRadius | Uniform point in a horizontal disc around origin — the spawn-scatter and wander-target primitive. |
Vec3 | RotateVector | Rotators are euler degrees (pitch x, yaw y, roll z) everywhere a graph sees them; the quaternion stays inside. |
Vec3 | UnrotateVector | |
Vec3 | ComposeRotations | |
Vec3 | InverseRotation | |
Vec3 | RotationLerp | |
Vec3 | ReflectVector | |
Vec3 | ProjectVectorOnPlane | |
Vec3 | ClampVectorLength | |
float | DistanceXZ | |
float | SignedAngleBetween | |
FTransform | MakeTransform | Transforms travel as a struct pin; these are its Make and Break, the way a Blueprint splits one, plus the operations a graph otherwise has no form for. |
void | BreakTransform | |
FTransform | ComposeTransforms | |
Vec3 | TransformLocation | |
Vec3 | TransformDirection | |
FRotator | MakeRotator | |
Quat | RotatorToQuat | |
FRotator | QuatToRotator |
Function details
FInterpTo
float FInterpTo(float current, float target, float deltaSeconds, float interpSpeed) constA non-positive speed snaps to the target (UE's convention).
VInterpTo
Vec3 VInterpTo(const Vec3& current, const Vec3& target, float deltaSeconds, float interpSpeed) constFInterpConstantTo
float FInterpConstantTo(float current, float target, float deltaSeconds, float interpSpeed) constConstant-rate approach — moves at interpSpeed units per second and never overshoots.
AngleInterpTo
float AngleInterpTo(float currentDegrees, float targetDegrees, float deltaSeconds, float interpSpeed) constShortest-path angular approach, so easing 350° toward 10° goes forward through 0 instead of the long way round.
MapRange
float MapRange(float value, float inMin, float inMax, float outMin, float outMax) constRe-ranges a value; a zero-width input range returns outMin rather than dividing by zero.
NormalizeAngle
float NormalizeAngle(float degrees) constWraps to (-180, 180].
DeltaAngle
float DeltaAngle(float fromDegrees, float toDegrees) constSigned shortest rotation from one angle to the other, in (-180, 180].
AngleBetween
float AngleBetween(const Vec3& a, const Vec3& b) constUnsigned angle between two directions, in [0, 180].
DotProduct
float DotProduct(const Vec3& a, const Vec3& b) constCrossProduct
Vec3 CrossProduct(const Vec3& a, const Vec3& b) constVectorLength
float VectorLength(const Vec3& v) constNormalizeVector
Vec3 NormalizeVector(const Vec3& v) constVectorLerp
Vec3 VectorLerp(const Vec3& a, const Vec3& b, float alpha) constDirectionBetween
Vec3 DirectionBetween(const Vec3& from, const Vec3& to) constUnit vector from one point toward another; zero when they coincide.
RotationFromDirection
Vec3 RotationFromDirection(const Vec3& direction) constEuler degrees that face direction (the rotation form of a look-at), and its inverse. Round-trips through the same +Z-forward, +Y-up basis the actor accessors use.
DirectionFromRotation
Vec3 DirectionFromRotation(const Vec3& degrees) constRandomPointInRadius
Vec3 RandomPointInRadius(const Vec3& origin, float radius) constUniform point in a horizontal disc around origin — the spawn-scatter and wander-target primitive. (Scalar ranged randoms are already Pure ops; only the vector-shaped form was missing.)
RotateVector
Vec3 RotateVector(const Vec3& v, const Vec3& degrees) constRotators are euler degrees (pitch x, yaw y, roll z) everywhere a graph sees them; the quaternion stays inside.
UnrotateVector
Vec3 UnrotateVector(const Vec3& v, const Vec3& degrees) constComposeRotations
Vec3 ComposeRotations(const Vec3& aDegrees, const Vec3& bDegrees) constInverseRotation
Vec3 InverseRotation(const Vec3& degrees) constRotationLerp
Vec3 RotationLerp(const Vec3& aDegrees, const Vec3& bDegrees, float alpha) constReflectVector
Vec3 ReflectVector(const Vec3& v, const Vec3& normal) constProjectVectorOnPlane
Vec3 ProjectVectorOnPlane(const Vec3& v, const Vec3& normal) constClampVectorLength
Vec3 ClampVectorLength(const Vec3& v, float maxLength) constDistanceXZ
float DistanceXZ(const Vec3& a, const Vec3& b) constSignedAngleBetween
float SignedAngleBetween(const Vec3& from, const Vec3& to, const Vec3& axis) constMakeTransform
FTransform MakeTransform(const Vec3& location, const Quat& rotation, const Vec3& scale) constTransforms travel as a struct pin; these are its Make and Break, the way a Blueprint splits one, plus the operations a graph otherwise has no form for. A rotator travels as (pitch, yaw, roll) in degrees on a vector pin.
BreakTransform
void BreakTransform(const FTransform& transform, Vec3& location, Quat& rotation, Vec3& scale) constComposeTransforms
FTransform ComposeTransforms(const FTransform& parent, const FTransform& child) constTransformLocation
Vec3 TransformLocation(const FTransform& transform, const Vec3& location) constTransformDirection
Vec3 TransformDirection(const FTransform& transform, const Vec3& direction) constMakeRotator
FRotator MakeRotator(float pitch, float yaw, float roll) constRotatorToQuat
Quat RotatorToQuat(const FRotator& rotator) constQuatToRotator
FRotator QuatToRotator(const Quat& rotation) const