Created a page for the Parse Quantity node. |
Updated description and linked to new quantity types page. "QuantityX" doesn't exist in Resonite. |
||
Line 14: | Line 14: | ||
|}} | |}} | ||
The '''Parse Quantity''' node takes in a string | The '''Parse Quantity''' node takes in a [[Type:string|string]] containing a written quantity value, along with the [[Type:string|string]] of the default unit to assume if no explicit unit is present as part of the input string. It returns the parsed quantity value as a [[Quantity Types|quantity type]] and a [[Type:bool|bool]] indicating wether it parsed successfully. | ||
To create | To create this node, you need to specify a valid [[Quantity Types|quantity type]] for its generic parameter. Examples: <code>Mass</code>, <code>Time</code>, and <code>Voltage</code>. | ||
== Inputs == | == Inputs == | ||
Line 26: | Line 26: | ||
=== DefaultUnit ([[Type:string|string]]) === | === DefaultUnit ([[Type:string|string]]) === | ||
The | The default unit to assume if no unit is present in the input string. | ||
== Outputs == | == Outputs == | ||
=== Value ( | === Value ([[Quantity Types|Quantity]]) === | ||
The parsed quantity value. | |||
=== IsParsed ([[Type:bool|bool]]) === | === IsParsed ([[Type:bool|bool]]) === | ||
Wether the input string was parsed successfully. | |||
[[Category:ProtoFlux:Math:Quantity]] | [[Category:ProtoFlux:Math:Quantity]] |
Latest revision as of 14:42, 8 September 2024
Parse Quantity <Type>
Quantity
The Parse Quantity node takes in a string containing a written quantity value, along with the string of the default unit to assume if no explicit unit is present as part of the input string. It returns the parsed quantity value as a quantity type and a bool indicating wether it parsed successfully.
To create this node, you need to specify a valid quantity type for its generic parameter. Examples: Mass
, Time
, and Voltage
.
Inputs
Str (string)
The string to parse.
DefaultUnit (string)
The default unit to assume if no unit is present in the input string.
Outputs
Value (Quantity)
The parsed quantity value.
IsParsed (bool)
Wether the input string was parsed successfully.