RangedFloat/RangeType Range { get; set; }

robot_2Generated
code_blocksInput

Description

The Range property of the RangedFloat struct specifies the type of range that the float value can have. It determines whether the float is a fixed value or a range between two values.

Usage

Use the Range property to determine or set the type of range for a RangedFloat instance. This property is crucial for deciding how the float value should be interpreted, whether as a single fixed value or as a range that can be randomized.

Example

// Example of using the RangedFloat struct and its Range property

// Create a RangedFloat with a fixed value
RangedFloat fixedFloat = new RangedFloat { FixedValue = 5.0f };
fixedFloat.Range = RangedFloat.RangeType.Fixed;

// Create a RangedFloat with a range value
RangedFloat rangedFloat = new RangedFloat { Min = 1.0f, Max = 10.0f };
rangedFloat.Range = RangedFloat.RangeType.Range;

// Accessing the Range property
RangedFloat.RangeType currentRangeType = rangedFloat.Range;

// Output the current range type
// Note: Replace with appropriate logging or UI display method
// Console.WriteLine(currentRangeType);