aboutsummaryrefslogtreecommitdiffstats
path: root/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'unit.c')
-rw-r--r--unit.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/unit.c b/unit.c
index 9e03abf..de24dc3 100644
--- a/unit.c
+++ b/unit.c
@@ -45,8 +45,16 @@ double as_rpm(AngularSpeed x) {
return x * 60.0 / (2.0 * M_PI);
}
-Fraction percent(double x);
-double as_percent(Fraction x);
+
+Fraction
+percent(double x) {
+ return x / 100.0;
+}
+
+double
+as_percent(Fraction x) {
+ return x * 100.0;
+}
Pressure