MCPcopy Create free account
hub / github.com/daisy/MathCAT / to_float

Function to_float

src/interface.rs:233–238  ·  view source on GitHub ↗
(name: &str, value: &str)

Source from the content-addressed store, hash-verified

231 return Ok( () );
232
233 fn to_float(name: &str, value: &str) -> Result<f64> {
234 return match value.parse::<f64>() {
235 Ok(val) => Ok(val),
236 Err(_) => bail!("SetPreference: preference'{}'s value '{}' must be a float", name, value),
237 };
238 }
239}
240
241/// Get the braille associated with the MathML that was set by [`set_mathml`].

Callers 1

set_preferenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected