refactor: rename DTree to DValue
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
:sig
|
||||
f64 DTree::to_f64(f64 default_value = 0) const
|
||||
f64 DValue::to_f64(f64 default_value = 0) const
|
||||
|
||||
:params
|
||||
default_value : returned when the value is missing or cannot be parsed as a number
|
||||
@@ -7,7 +7,7 @@ return value : the value as a floating-point number, or `default_value`
|
||||
|
||||
:see
|
||||
>types
|
||||
0_DTree
|
||||
0_DValue
|
||||
json_decode
|
||||
float_val
|
||||
to_bool
|
||||
@@ -15,7 +15,7 @@ to_s64
|
||||
to_u64
|
||||
|
||||
:content
|
||||
Reads a `DTree` value as a floating-point number. This is a read accessor: it is `const`, never creates or modifies nodes, and dereferences internal references automatically.
|
||||
Reads a `DValue` value as a floating-point number. This is a read accessor: it is `const`, never creates or modifies nodes, and dereferences internal references automatically.
|
||||
|
||||
String values are trimmed and parsed permissively: numeric forms and the boolean words understood by `to_bool()` both convert. Boolean values become `1.0` or `0.0`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user