From 5cad47d4e67c902304c4c2b7feeb9c3d34fdffba Mon Sep 17 00:00:00 2001 From: Mike Boutin Date: Sat, 27 Apr 2019 10:30:12 -0400 Subject: [PATCH] Format for readability. --- src/si/acceleration.rs | 6 ++++-- src/si/angle.rs | 2 +- src/si/jerk.rs | 7 +++++-- src/si/length.rs | 6 ++++-- src/si/mod.rs | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/si/acceleration.rs b/src/si/acceleration.rs index 4230b49a..3ee8b91b 100644 --- a/src/si/acceleration.rs +++ b/src/si/acceleration.rs @@ -56,9 +56,11 @@ quantity! { @yoctometer_per_second_squared: prefix!(yocto); "ym/s²", "yoctometer per second squared", "yoctometers per second squared"; - @foot_per_second_squared: 3.048_E-1; "ft/s²", "foot per second squared", "feet per second squared"; + @foot_per_second_squared: 3.048_E-1; "ft/s²", "foot per second squared", + "feet per second squared"; @galileo: 1.0_E-2; "Gal", "galileo", "galileos"; - @inch_per_second_squared: 2.54_E-2; "in/s²", "inch per second squared", "inches per second squared"; + @inch_per_second_squared: 2.54_E-2; "in/s²", "inch per second squared", + "inches per second squared"; @millimeter_per_minute_squared: 2.777_777_777_777_777_8_E-7; "mm/min²", "millimeter per minute squared", "millimeters per minute squared"; } diff --git a/src/si/angle.rs b/src/si/angle.rs index 1c61c70f..dc48476b 100644 --- a/src/si/angle.rs +++ b/src/si/angle.rs @@ -20,7 +20,7 @@ quantity! { units { /// SI derived unit of angle. It is the angle subtended at the center of a circle by an /// arc that is equal in length to the radius of the circle. - @radian: 1.0; "rad", "radian", "radians"; + @radian: 1.0_E0; "rad", "radian", "radians"; @revolution: 6.283_185_307_179_586_E0; "r", "revolution", "revolutions"; @degree: 1.745_329_251_994_329_5_E-2; "°", "degree", "degrees"; @gon: 1.570_796_326_794_896_7_E-2; "gon", "gon", "gons"; diff --git a/src/si/jerk.rs b/src/si/jerk.rs index b9da36a9..e83c5494 100644 --- a/src/si/jerk.rs +++ b/src/si/jerk.rs @@ -56,8 +56,10 @@ quantity! { @yoctometer_per_second_cubed: prefix!(yocto); "ym/s³", "yoctometer per second cubed", "yoctometers per second cubed"; - @foot_per_second_cubed: 3.048_E-1; "ft/s³", "foot per second cubed", "feet per second cubed"; - @inch_per_second_cubed: 2.54_E-2; "in/s³", "inch per second cubed", "inches per second cubed"; + @foot_per_second_cubed: 3.048_E-1; "ft/s³", "foot per second cubed", + "feet per second cubed"; + @inch_per_second_cubed: 2.54_E-2; "in/s³", "inch per second cubed", + "inches per second cubed"; @kilometer_per_minute_cubed: 4.629_629_629_629_629_E-3; "km/min³", "kilometer per minute cubed", "kilometers per minute cubed"; } @@ -104,6 +106,7 @@ mod tests { test::(); test::(); test::(); + test::(); test::(); test::(); diff --git a/src/si/length.rs b/src/si/length.rs index b19c6b95..585b1abe 100644 --- a/src/si/length.rs +++ b/src/si/length.rs @@ -53,9 +53,11 @@ quantity! { @mile_survey: 1.609_347_E3; "mi (U.S. survey)", "mile (U.S. survey)", "miles (U.S. survey)"; @nautical_mile: 1.852_E3; "M", "nautical mile", "nautical miles"; @parsec: 3.085_678_E16; "pc", "parsec", "parsecs"; - @pica_computer: 4.233_333_333_333_333_E-3; "1/6 in (computer)", "pica (computer)", "picas (computer)"; + @pica_computer: 4.233_333_333_333_333_E-3; "1/6 in (computer)", "pica (computer)", + "picas (computer)"; @pica_printers: 4.217_518_E-3; "1/6 in", "pica (printer's)", "picas (printer's)"; - @point_computer: 3.527_778_E-4; "1/72 in (computer)", "point (computer)", "points (computer)"; + @point_computer: 3.527_778_E-4; "1/72 in (computer)", "point (computer)", + "points (computer)"; @point_printers: 3.514_598_E-4; "1/72 in", "point (printer's)", "points (printer's)"; @rod: 5.029_21_E0; "rd", "rod", "rods"; @yard: 9.144_E-1; "yd", "yard", "yards"; diff --git a/src/si/mod.rs b/src/si/mod.rs index 050f453c..c3464a02 100644 --- a/src/si/mod.rs +++ b/src/si/mod.rs @@ -28,11 +28,11 @@ system! { available_energy::AvailableEnergy, capacitance::Capacitance, density::Density, - electrical_resistance::ElectricalResistance, - electrical_conductance::ElectricalConductance, electric_charge::ElectricCharge, electric_current::ElectricCurrent, electric_potential::ElectricPotential, + electrical_conductance::ElectricalConductance, + electrical_resistance::ElectricalResistance, energy::Energy, force::Force, frequency::Frequency,