aboutsummaryrefslogtreecommitdiffstats
path: root/unit.c
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-03-02 12:18:34 -0500
committerSam Anthony <sam@samanthony.xyz>2025-03-02 12:18:34 -0500
commitcd73fd40ffc04a65abe0260fe82949d7c354e282 (patch)
tree5162949c3f3e65508072eacb52f3b1c562958607 /unit.c
parent5e379b1cf70006dbe782df991a655c475630a146 (diff)
downloadvolute-cd73fd40ffc04a65abe0260fe82949d7c354e282.zip
add inHG pressure unit
Diffstat (limited to 'unit.c')
-rw-r--r--unit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/unit.c b/unit.c
index d1e487d..dfe75c4 100644
--- a/unit.c
+++ b/unit.c
@@ -85,6 +85,11 @@ psi(double x) {
return x * KG_PER_LB * G / pow(M_PER_IN, 2);
}
+Pressure
+inch_mercury(double x) {
+ return x * 3386.389;
+}
+
double
as_pascal(Pressure x) {
return x;
@@ -110,6 +115,11 @@ as_psi(Pressure x) {
return x * pow(M_PER_IN, 2) / (KG_PER_LB * G);
}
+double
+as_inch_mercury(Pressure x) {
+ return x / 3386.389;
+}
+
Temperature
kelvin(double x) {