Luna/libluna/include/luna/Units.h

13 lines
303 B
C
Raw Normal View History

2022-11-30 11:42:11 +00:00
#pragma once
#include <luna/Result.h>
#include <luna/String.h>
2022-11-30 11:42:11 +00:00
enum class Unit : usize
{
SI = 1000,
Binary = 1024
};
Result<String> to_dynamic_unit(usize value, usize round_after = 1000, bool separate = true, Unit unit = Unit::Binary,
bool display_unit = true);