aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unit.c21
-rw-r--r--unit.h10
2 files changed, 31 insertions, 0 deletions
diff --git a/unit.c b/unit.c
index dfe75c4..9fd54f9 100644
--- a/unit.c
+++ b/unit.c
@@ -235,3 +235,24 @@ double
as_cubic_foot_per_min(VolumeFlowRate x) {
return x * SEC_PER_MIN / pow(M_PER_FT, 3);
}
+
+
+MassFlowRate
+kilo_per_sec(double x) {
+ return x;
+}
+
+MassFlowRate
+pound_per_min(double x) {
+ return x * KG_PER_LB / SEC_PER_MIN;
+}
+
+double
+as_kilo_per_sec(MassFlowRate m) {
+ return m;
+}
+
+double
+as_pound_per_min(MassFlowRate m) {
+ return m / KG_PER_LB * SEC_PER_MIN;
+}
diff --git a/unit.h b/unit.h
index 520285b..b189ff1 100644
--- a/unit.h
+++ b/unit.h
@@ -74,3 +74,13 @@ VolumeFlowRate cubic_foot_per_min(double x);
double as_cubic_metre_per_sec(VolumeFlowRate x);
double as_cubic_metre_per_min(VolumeFlowRate x);
double as_cubic_foot_per_min(VolumeFlowRate x);
+
+
+typedef double MassFlowRate;
+typedef MassFlowRate (*MassFlowRateMaker)(double);
+typedef double (*MassFlowRateReader)(MassFlowRate);
+
+MassFlowRate kilo_per_sec(double x);
+MassFlowRate pound_per_min(double x);
+double as_kilo_per_sec(MassFlowRate m);
+double as_pound_per_min(MassFlowRate m);