UKismetMathLibrary::Less_TimespanTimespan
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if A is strictly less than B. In Blueprint this is the '<' operator node for Timespan.
Caveats & Gotchas
- • A negative FTimespan (e.g., from subtracting a larger from a smaller span) is less than FTimespan::Zero() — this is correct behavior but can surprise developers who expect magnitudes.
- • In C++ use the < operator on FTimespan directly.
Signature
static UE_INL_API bool Less_TimespanTimespan( FTimespan A, FTimespan B ); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FTimespan | Left-hand timespan. | — |
| B | FTimespan | Right-hand timespan. | — |
Return Type
bool Example
Warn if a recorded lap time is too short C++
FTimespan MinLapTime = FTimespan::FromSeconds(20.0);
if (UKismetMathLibrary::Less_TimespanTimespan(RecordedLap, MinLapTime))
{
UE_LOG(LogTemp, Warning, TEXT("Suspiciously fast lap!"));
} Tags
Version History
Introduced in: 4.7
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?