MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / into

Method into

src/data/json/mod.rs:40–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38impl Into<f64> for NumVal
39{
40 fn into(self) -> f64
41 {
42 use num_traits::float::FloatCore as _;
43
44 let sign = if self.neg
45 {
46 -1.0
47 }
48 else
49 {
50 1.0
51 };
52
53 (self.int as f64 + self.frac as f64 / 10f64.powi(self.frac_len as i32))
54 * 10f64.powi(self.exp)
55 * sign
56 }
57}
58
59pub type JsonObj = Vec<(Vec<char>, JsonVal)>;

Callers 14

shcompFunction · 0.80
setdirFunction · 0.80
setenvFunction · 0.80
setuserFunction · 0.80
to_f64Method · 0.80
fromMethod · 0.80
openMethod · 0.80
rpathFunction · 0.80
createMethod · 0.80
openMethod · 0.80
createMethod · 0.80
openMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected