qxLib
|
#include <qx/containers/string/format_string.h>
#include <qx/meta/concepts.h>
#include <qx/math/units/base.inl>
Go to the source code of this file.
Classes | |
struct | qx::unit< T, unit_t > |
struct | std::formatter< qx::unit< T, unit_t >, qx::char_type > |
Functions | |
template<arithmetic_c T, enumeration_c unit_t> | |
unit< T, unit_t > | qx::normalize_unit (unit< T, unit_t > unit) noexcept |
The function returns the closest value greater than one from the SI for the unit of measurement. More... | |
template<arithmetic_c T, enumeration_c unit_t> | |
unit< T, unit_t > | qx::normalize_unit (T value, unit_t eInitialType) noexcept |
The function returns the closest value greater than one from the SI for the unit of measurement. More... | |
template<arithmetic_c T, enumeration_c unit_t, class char_t > | |
std::optional< unit< T, unit_t > > | qx::unit_from_string (basic_string_view< char_t > svValue) noexcept |
Creates a unit from a string. More... | |
|
noexcept |
The function returns the closest value greater than one from the SI for the unit of measurement.
T | - floating point or integral value type |
unit_t | - unit type enum |
value | - input unit value |
eInitialType | - input unit type |
- | the closest value greater than one from the SI for the unit of measurement |
|
noexcept |
The function returns the closest value greater than one from the SI for the unit of measurement.
T | - floating point or integral value type |
unit_t | - unit type enum |
unit | - input unit |
- | the closest value greater than one from the SI for the unit of measurement |
|
noexcept |
Creates a unit from a string.
Input examples: 20KiB
20 KiB
20 KiB
20KiB
T | - expected value type |
unit_t | - unit enum |
char_t | - input string char type |
svValue | - input string value |
- | a unit if created successfully or std::nullopt |