small changes based on code review

This commit is contained in:
Oliver Schönrock authored and Mateusz Pusz committed 2019-12-28 17:59:47 +01:00
1 parent 509b6c9653
commit 0ad78fe753
4 files changed
+32 -31

No files matched your search

+21 -20
View File
@@ -23,31 +23,32 @@
#pragma once
#include <units/prefix.h>
#include <ratio>
namespace units::si {
struct prefix : prefix_type {};
// TODO Remove dependency on std::ratio
// clang-format off
struct atto : units::prefix<atto, prefix, "a", ratio<1, 1, -18>> {}; // std::atto::den>> {};
struct femto : units::prefix<femto, prefix, "f", ratio<1, 1, -15>> {}; // std::femto::den>> {};
struct pico : units::prefix<pico, prefix, "p", ratio<1, 1, -12>> {}; // std::pico::den>> {};
struct nano : units::prefix<nano, prefix, "n", ratio<1, 1, -9>> {}; // std::nano::den>> {};
struct micro : units::prefix<micro, prefix, "\u00b5", ratio<1, 1, -6>> {}; // std::micro::den>> {};
struct milli : units::prefix<milli, prefix, "m", ratio<1, 1, -3>> {}; // std::milli::den>> {};
struct centi : units::prefix<centi, prefix, "c", ratio<1, 1, -2>> {}; // std::centi::den>> {};
struct deci : units::prefix<deci, prefix, "d", ratio<1, 1, -1>> {}; // std::deci::den>> {};
struct deca : units::prefix<deca, prefix, "da", ratio<1, 1, 1>> {}; // std::deca::num>> {};
struct hecto : units::prefix<hecto, prefix, "h", ratio<1, 1, 2>> {}; // std::hecto::num>> {};
struct kilo : units::prefix<kilo, prefix, "k", ratio<1, 1, 3>> {}; // std::kilo::num>> {};
struct mega : units::prefix<mega, prefix, "M", ratio<1, 1, 6>> {}; // std::mega::num>> {};
struct giga : units::prefix<giga, prefix, "G", ratio<1, 1, 9>> {}; // std::giga::num>> {};
struct tera : units::prefix<tera, prefix, "T", ratio<1, 1, 12>> {}; // std::tera::num>> {};
struct peta : units::prefix<peta, prefix, "P", ratio<1, 1, 15>> {}; // std::peta::num>> {};
struct exa : units::prefix<exa, prefix, "E", ratio<1, 1, 18>> {}; // std::exa::num>> {};
// clang-format off
struct yocto : units::prefix<yocto, prefix, "y", ratio<1, 1, -24>> {};
struct zepto : units::prefix<zepto, prefix, "z", ratio<1, 1, -21>> {};
struct atto : units::prefix<atto, prefix, "a", ratio<1, 1, -18>> {};
struct femto : units::prefix<femto, prefix, "f", ratio<1, 1, -15>> {};
struct pico : units::prefix<pico, prefix, "p", ratio<1, 1, -12>> {};
struct nano : units::prefix<nano, prefix, "n", ratio<1, 1, -9>> {};
struct micro : units::prefix<micro, prefix, "\u00b5", ratio<1, 1, -6>> {};
struct milli : units::prefix<milli, prefix, "m", ratio<1, 1, -3>> {};
struct centi : units::prefix<centi, prefix, "c", ratio<1, 1, -2>> {};
struct deci : units::prefix<deci, prefix, "d", ratio<1, 1, -1>> {};
struct deca : units::prefix<deca, prefix, "da", ratio<1, 1, 1>> {};
struct hecto : units::prefix<hecto, prefix, "h", ratio<1, 1, 2>> {};
struct kilo : units::prefix<kilo, prefix, "k", ratio<1, 1, 3>> {};
struct mega : units::prefix<mega, prefix, "M", ratio<1, 1, 6>> {};
struct giga : units::prefix<giga, prefix, "G", ratio<1, 1, 9>> {};
struct tera : units::prefix<tera, prefix, "T", ratio<1, 1, 12>> {};
struct peta : units::prefix<peta, prefix, "P", ratio<1, 1, 15>> {};
struct exa : units::prefix<exa, prefix, "E", ratio<1, 1, 18>> {};
struct zetta : units::prefix<zetta, prefix, "Z", ratio<1, 1, 21>> {};
struct yotta : units::prefix<yotta, prefix, "Y", ratio<1, 1, 24>> {};
// clang-format on
} // namespace units::si