Commit 26af1f95 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'units_print' into 'master'

Add a print units

See merge request !463
parents cb0b4486 7813154b
......@@ -587,3 +587,17 @@ double units_conversion_factor(const struct unit_system* from,
return units_general_conversion_factor(from, to, baseUnitsExp);
* @brief print a #unit_system
* @param us The #unit_system
void units_print(const struct unit_system* us) {
message("\tUnit Mass: %g", us->UnitMass_in_cgs);
message("\tUnit Length: %g", us->UnitLength_in_cgs);
message("\tUnit Time: %g", us->UnitTime_in_cgs);
message("\tUnit Current: %g", us->UnitCurrent_in_cgs);
message("\tUnit Temperature: %g", us->UnitTemperature_in_cgs);
......@@ -137,4 +137,6 @@ double units_conversion_factor(const struct unit_system* from,
const struct unit_system* to,
enum unit_conversion_factor unit);
void units_print(const struct unit_system* us);
#endif /* SWIFT_UNITS_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment