Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit ee60b72

Browse files
committed
Improve calculation method
1 parent 22b22f7 commit ee60b72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/TrickyFunctionLibrary/Private/TrickyUtilsLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ FString UTrickyUtilsLibrary::ConvertTimeSeconds(const float TimeSeconds, const E
1515
FString Result = "";
1616

1717
const int32 TotalMinutes = static_cast<int32>(Timespan.GetTotalMinutes());
18-
const int32 Seconds = Timespan.GetSeconds();
19-
const int32 TotalSeconds = static_cast<int32>(Timespan.GetTotalSeconds());
18+
const int32 Seconds = FMath::CeilToInt(Timespan.GetSeconds());
19+
const int32 TotalSeconds =(FMath::CeilToInt(Timespan.GetTotalSeconds()));
2020
const int32 Milliseconds = Timespan.GetFractionMilli();
2121

2222
auto ConvertMilliseconds = [&Milliseconds](const float Fraction) -> int32

0 commit comments

Comments
 (0)