The Max
property of the RangedFloat
struct represents the maximum value of the float range. In cases where the RangeType
is set to Fixed
, the Max
value will be the same as the Min
value, indicating a fixed value rather than a range.
The Max
property of the RangedFloat
struct represents the maximum value of the float range. In cases where the RangeType
is set to Fixed
, the Max
value will be the same as the Min
value, indicating a fixed value rather than a range.
Use the Max
property to retrieve or set the upper limit of the range for a RangedFloat
instance. This property is particularly useful when you need to define a range of possible values for a float, allowing for randomization within that range.
// Example of using RangedFloat with Max property RangedFloat rangedFloat = new RangedFloat(); rangedFloat.Min = 1.0f; rangedFloat.Max = 5.0f; // Accessing the Max property float maxValue = rangedFloat.Max; // Output the max value // Note: Avoid using Console.WriteLine in s&box // Instead, use logging or debugging tools provided by the engine // Log.Info($"Max value: {maxValue}");