Page MenuHomec4science

units.hpp
No OneTemporary

File Metadata

Created
Tue, Jan 7, 00:04

units.hpp

#ifndef SPECMICP_IO_UNITS_HPP
#define SPECMICP_IO_UNITS_HPP
#include <string>
#include "physics/units.hpp"
namespace specmicp {
namespace io {
std::string length_unit_to_string(units::LengthUnit length_u)
{
switch (length_u) {
case units::LengthUnit::meter:
return "m";
break;
case units::LengthUnit::decimeter:
return "dm";
break;
case units::LengthUnit::centimeter:
return "cm";
break;
}
}
std::string volume_unit_to_string(units::LengthUnit length_u)
{
return length_unit_to_string(length_u) + "^3";
}
} // end namespace io
} // end namespace specmicp
#endif // SPECMICP_IO_UNITS_HPP

Event Timeline