The Deconstruct
method is used to decompose a RangedFloat
instance into its minimum and maximum values. This method is particularly useful for tuple deconstruction, allowing you to easily extract the range values into separate variables.
The Deconstruct
method is used to decompose a RangedFloat
instance into its minimum and maximum values. This method is particularly useful for tuple deconstruction, allowing you to easily extract the range values into separate variables.
To use the Deconstruct
method, you need to have a RangedFloat
instance. You can then call this method to deconstruct the instance into two separate float
variables representing the minimum and maximum values of the range.
RangedFloat rangedFloat = new RangedFloat(1.0f, 5.0f); rangedFloat.Deconstruct(out float min, out float max); // Now min is 1.0f and max is 5.0f // Alternatively, using tuple deconstruction: (float min, float max) = rangedFloat;