Repository navigation
API Overview
Marcus Ackre Medina edited this page Sep 13, 2026
·
1 revision
MarcusMedina.Units.Pressure.Pressure — a readonly struct implementing IComparable<Pressure> and IEquatable<Pressure>. Internally stores everything as pascals via the Pascals property (double).
public Pressure(double pascals)
public double Pascals { get; }ToString() renders as "{value} Pa" using invariant culture.
Every creation method below has both an int and a double overload. Factors are the exact multipliers used in source to convert to pascals.
| Unit | Create | Convert back | Factor (→ Pa) |
|---|---|---|---|
| Micropascal | Micropascals() |
ToMicropascals() |
0.000001 |
| Millipascal | Millipascals() |
ToMillipascals() |
0.001 |
| Pascal | Pascals() |
ToPascals() |
1 |
| Hectopascal | Hectopascals() |
ToHectopascals() |
100 |
| Kilopascal | Kilopascals() |
ToKilopascals() |
1,000 |
| Megapascal | Megapascals() |
ToMegapascals() |
1,000,000 |
| Gigapascal | Gigapascals() |
ToGigapascals() |
1,000,000,000 |
| Bar | Bar() |
ToBar() |
100,000 |
| Millibar | Millibar() |
ToMillibar() |
100 |
| Microbar | Microbar() |
ToMicrobar() |
0.1 |
Note: Bar(), Millibar(), and Microbar() are singular (not Bars()/Millibars()).
| Unit | Create | Convert back | Factor (→ Pa) |
|---|---|---|---|
| Standard atmosphere | Atm() |
ToAtm() |
101,325 (exact) |
| Torr | Torr() |
ToTorr() |
133.3223684 |
| Millimeter of mercury (mmHg) | MmHg() |
ToMmHg() |
133.3223684 |
| Centimeter of water (cmH₂O) | CmH2O() |
ToCmH2O() |
98.0665 |
| Inch of mercury (inHg) | InHg() |
ToInHg() |
3,386.388640341 |
| Inch of water (inH₂O) | InH2O() |
ToInH2O() |
249.0889083 |
Torr() and MmHg() use the identical factor — 1 Torr is defined as equal to 1 mmHg.
| Unit | Create | Convert back | Factor (→ Pa) |
|---|---|---|---|
| PSI (pound per square inch) | Psi() |
ToPsi() |
6,894.757293168 |
| PSF (pound per square foot) | Psf() |
ToPsf() |
47.88025898034 |
| KSI (kilopound per square inch) | Ksi() |
ToKsi() |
6,894,757.293 |
| Operator | Signature | Behavior |
|---|---|---|
==, !=
|
Pressure, Pressure |
Value equality on Pascals
|
<, >, <=, >=
|
Pressure, Pressure |
Compares Pascals
|
+ |
Pressure + Pressure |
Adds Pascals
|
- |
Pressure - Pressure |
Subtracts Pascals
|
* |
Pressure * double |
Scales Pascals by a factor |
/ |
Pressure / double |
Divides Pascals by a divisor, returns Pressure
|
/ |
Pressure / Pressure |
Divides Pascals by Pascals, returns double (ratio) |
No enums are defined in this package.