RealDocs

FMath: RESOLVE_FLOAT_AMBIGUITY_3_ARGS

function Core Since 5.0
#include "Templates/ResolveTypeAmbiguity.h"
Access: public

Description

Preprocessor macro that currently expands to MIX_FLOATS_3_ARGS, injecting mixed float/double overloads for a three-argument function to eliminate compiler ambiguity errors when argument types differ.

Caveats & Gotchas

  • RESOLVE_FLOAT_AMBIGUITY_3_ARGS is currently identical to MIX_FLOATS_3_ARGS in the engine source — it is a named alias reserved for cases where the semantics are about resolving ambiguity rather than type mixing, for clarity at the call site.
  • This macro is used in FMath for functions like ClampAngle to handle mixed (float, double, int) argument lists. You do not call this macro yourself; it is an internal code-generation tool.

Signature

RESOLVE_FLOAT_AMBIGUITY_3_ARGS(Func)

Parameters

Name Type Description Default
Func identifier The three-argument function name for which to resolve float/double ambiguity.

Example

Mixed-type ClampAngle call enabled by this macro C++
// RESOLVE_FLOAT_AMBIGUITY_3_ARGS(ClampAngle) in FMath enables:
double Clamped = FMath::ClampAngle(45, -90.0, 90.0); // int + double + double -> double

Tags

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.