struct

FMath

Module
Core
Header
#include "Core/FMath.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr floatSmallNumberDefault 1e-4f.
static constexpr floatKindaSmallNumberthe looser float epsilon Default 1e-3f.
static constexpr floatPiDefault Mowo::PI.
static constexpr floatTwoPiDefault Mowo::TWO_PI.
static constexpr floatHalfPiDefault Mowo::HALF_PI.
static constexpr floatDegToRadDefault Mowo::DEG2RAD.
static constexpr floatRadToDegDefault Mowo::RAD2DEG.

Public functions

ReturnsNameDescription
TMin
TMax
TClamp
TLerp
floatSmoothStepSmooth-step (Hermite, t in [0,1]).
floatFInterpToFrame-rate-independent exponential approach.
floatMapRange
floatMapRangeClamped
TSquare
TCube
>> boolIsPowerOfTwo
uint32_tRoundUpToPowerOfTwo
uint32_tDivideAndRoundUp
uint64_tAlignUpAny alignment, not only powers of two; 0 and 1 leave the value alone.
boolIsNearlyEqual
boolIsNearlyZero
TAbs
TSign
floatDegreesToRadians
floatRadiansToDegrees

Function details

Min

C++
template<typename T> static constexpr T Min(T a, T b) noexcept

Max

C++
template<typename T> static constexpr T Max(T a, T b) noexcept

Clamp

C++
template<typename T> static constexpr T Clamp(T value, T lo, T hi) noexcept

Lerp

C++
template<typename T> static constexpr T Lerp(T a, T b, float t) noexcept

SmoothStep

C++
static constexpr float SmoothStep(float t) noexcept

Smooth-step (Hermite, t in [0,1]).

FInterpTo

C++
static float FInterpTo(float current, float target, float dt, float rate)

Frame-rate-independent exponential approach. current moves toward target by 1 - exp(-rate * dt).

MapRange

C++
static constexpr float MapRange(float value, float inMin, float inMax, float outMin, float outMax) noexcept

MapRangeClamped

C++
static constexpr float MapRangeClamped(float value, float inMin, float inMax, float outMin, float outMax) noexcept

Square

C++
template<typename T> static constexpr T Square(T v) noexcept

Cube

C++
template<typename T> static constexpr T Cube(T v) noexcept

IsPowerOfTwo

C++
template<typename T, typename = std::enable_if_t<std::is_integral_v<T>>> static constexpr bool IsPowerOfTwo(T v) noexcept

RoundUpToPowerOfTwo

C++
static constexpr uint32_t RoundUpToPowerOfTwo(uint32_t v) noexcept

DivideAndRoundUp

C++
static constexpr uint32_t DivideAndRoundUp(uint32_t value, uint32_t divisor) noexcept

AlignUp

C++
static constexpr uint64_t AlignUp(uint64_t value, uint64_t alignment) noexcept

Any alignment, not only powers of two; 0 and 1 leave the value alone.

IsNearlyEqual

C++
static bool IsNearlyEqual(float a, float b, float eps = SmallNumber) noexcept

IsNearlyZero

C++
static bool IsNearlyZero(float v, float eps = SmallNumber) noexcept

Abs

C++
template<typename T> static constexpr T Abs(T v) noexcept

Sign

C++
template<typename T> static constexpr T Sign(T v) noexcept

DegreesToRadians

C++
static constexpr float DegreesToRadians(float deg) noexcept

RadiansToDegrees

C++
static constexpr float RadiansToDegrees(float rad) noexcept
Generated from Core/FMath.h via core.json · Nov 5, 2026Version 1.0.0