The y
field in the RangedFloat
struct represents the upper bound of the float range. It is marked as obsolete and should not be used in new code. Instead, use the Max
property to access the maximum value of the range.
The y
field in the RangedFloat
struct represents the upper bound of the float range. It is marked as obsolete and should not be used in new code. Instead, use the Max
property to access the maximum value of the range.
To access the maximum value of a RangedFloat
, use the Max
property instead of the y
field. The y
field is maintained for backward compatibility but is not recommended for use in new implementations.
// Example of using RangedFloat RangedFloat rangedFloat = new RangedFloat(); // Set the range using Min and Max properties rangedFloat.Min = 0.0f; rangedFloat.Max = 10.0f; // Get a random value within the range float randomValue = rangedFloat.GetValue(); // Accessing the Max value float maxValue = rangedFloat.Max;