ProtoFlux:Parse Quantity

From Resonite Wiki
Revision as of 14:42, 8 September 2024 by JackTheFoxOtter (talk | contribs) (Updated description and linked to new quantity types page. "QuantityX" doesn't exist in Resonite.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Parse Quantity <Type>
Str
Value
DefaultUnit
IsParsed
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.