36 std::uint64_t completed_steps,
37 std::uint64_t total_steps
41 (completed_steps * 100)
42 / std::max<std::uint64_t>(total_steps, 1u)
52 [[nodiscard]]
int get() const noexcept
72 [[nodiscard]] std::string
to_string() const noexcept
percentage(int percentage=0) noexcept
Construct percentage with a given value.
Definition percentage.hpp:25
void set(int percentage) noexcept
Set the percentage value.
Definition percentage.hpp:62
percentage(std::uint64_t completed_steps, std::uint64_t total_steps) noexcept
Construct percentage from completed and total steps.
Definition percentage.hpp:35
std::string to_string() const noexcept
Convert percentage to string.
Definition percentage.hpp:72
int get() const noexcept
Definition percentage.hpp:52
int m_percentage
Definition percentage.hpp:78
Definition percentage.hpp:12