xo-unit: + abbrevs
This commit is contained in:
parent
5bde1bfb94
commit
ce9df76a3d
4 changed files with 991 additions and 197 deletions
|
|
@ -31,6 +31,20 @@ namespace xo {
|
|||
n_dim
|
||||
};
|
||||
|
||||
inline const char *
|
||||
dim2str(dim x)
|
||||
{
|
||||
switch(x) {
|
||||
case dim::mass: return "mass";
|
||||
case dim::distance: return "distance";
|
||||
case dim::time: return "time";
|
||||
case dim::currency: return "currency";
|
||||
case dim::price: return "price";
|
||||
default: break;
|
||||
}
|
||||
return "?dim";
|
||||
}
|
||||
|
||||
static constexpr std::size_t n_dim = static_cast<std::size_t>(dim::n_dim);
|
||||
|
||||
enum class native_unit_id {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue