MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / convert_pressure

Function convert_pressure

src/conversions/pressure.rs:225–247  ·  view source on GitHub ↗

Convert pressure from one unit to another. This function accepts both `PressureUnit` enums and string identifiers. # Arguments `value` - The numerical value to convert `from_unit` - The unit to convert from (can be a `PressureUnit` enum or a string) `to_unit` - The unit to convert to (can be a `PressureUnit` enum or a string) # Returns The converted value, or an error if the unit is invalid

(value: f64, from_unit: F, to_unit: T)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 2

into_pressure_unitMethod · 0.80
to_pascal_factorMethod · 0.80

Tested by 1