Skip to content

Commit

Permalink
Improve calculation method
Browse files Browse the repository at this point in the history
  • Loading branch information
TrickyFatCat committed Dec 17, 2022
1 parent 22b22f7 commit ee60b72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/TrickyFunctionLibrary/Private/TrickyUtilsLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ FString UTrickyUtilsLibrary::ConvertTimeSeconds(const float TimeSeconds, const E
FString Result = "";

const int32 TotalMinutes = static_cast<int32>(Timespan.GetTotalMinutes());
const int32 Seconds = Timespan.GetSeconds();
const int32 TotalSeconds = static_cast<int32>(Timespan.GetTotalSeconds());
const int32 Seconds = FMath::CeilToInt(Timespan.GetSeconds());
const int32 TotalSeconds =(FMath::CeilToInt(Timespan.GetTotalSeconds()));
const int32 Milliseconds = Timespan.GetFractionMilli();

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

0 comments on commit ee60b72

Please sign in to comment.