RealDocs

UKismetMathLibrary::BMax

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns the larger of two byte values. Equivalent to `FMath::Max` but Blueprint-exposed and typed for uint8.

Caveats & Gotchas

  • The 'B' prefix stands for Byte, not bool — the name can be visually confusing alongside boolean nodes in Blueprint graphs.
  • In C++ code prefer `FMath::Max<uint8>` or a plain ternary for clarity; BMax exists primarily as the Blueprint node.

Signature

static UE_INL_API uint8 BMax(uint8 A, uint8 B);

Parameters

Name Type Description Default
A uint8 First value.
B uint8 Second value.

Return Type

uint8

Example

Ensuring a minimum byte value C++
uint8 AtLeastOne = UKismetMathLibrary::BMax(SomeValue, 1u);
// Guarantees result is never zero

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.