Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FMath
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static T Clamp
(
const T X, |
Clamps X to be between Min and Max, inclusive | Math/UnrealMathUtility.h | |
static decltype(X *Y *Z) Clamp
(
Arg1 X, |
Allow mixing float/double arguments, promoting to highest precision type. | Math/UnrealMathUtility.h | |
static float Clamp
(
const float X, |
Clamps X to be between Min and Max, inclusive. | Math/UnrealMathUtility.h | |
static double Clamp
(
const double X, |
Math/UnrealMathUtility.h | ||
static int64 Clamp
(
const int64 X, |
Clamps X to be between Min and Max, inclusive. Overload to support mixed int64/int32 types. | Math/UnrealMathUtility.h |
Clamp(const T, const T, const T)
Description
Clamps X to be between Min and Max, inclusive
| Name | Clamp |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
template<class T>
static T Clamp
(
const T X,
const T MinValue,
const T MaxValue
)
Clamp(Arg1, Arg2, Arg3)
Description
Allow mixing float/double arguments, promoting to highest precision type.
| Name | Clamp |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
template<typename Arg1, typename Arg2, typename Arg3, std::enable_if_t<((std::is_floating_point_v< Arg1 >||std::is_floating_point_v< Arg2 >||std::is_floating_point_v< Arg3 >) &&(!std::is_same_v< Arg1, Arg2 >||!std::is_same_v< Arg2, Arg3 >||!std::is_same_v< Arg1, Arg3 >)), int >>
static decltype(X *Y *Z) Clamp
(
Arg1 X,
Arg2 Y,
Arg3 Z
)
Clamp(const float, const float, const float)
Description
Clamps X to be between Min and Max, inclusive. Explicitly defined here for floats/doubles because static analysis gets confused between template and int versions.
| Name | Clamp |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
static float Clamp
(
const float X,
const float Min,
const float Max
)
Clamp(const double, const double, const double)
| Name | Clamp |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
static double Clamp
(
const double X,
const double Min,
const double Max
)
Clamp(const int64, const int32, const int32)
Description
Clamps X to be between Min and Max, inclusive. Overload to support mixed int64/int32 types.
| Name | Clamp |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
static int64 Clamp
(
const int64 X,
const int32 Min,
const int32 Max
)