Vector2 RangeValue { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The RangeValue property of the RangedFloat struct represents the range of values as a Vector2. The x component of the Vector2 corresponds to the minimum value, and the y component corresponds to the maximum value. Setting this property will convert the RangedFloat to a range value, allowing for randomization between the specified minimum and maximum values.

Usage

To use the RangeValue property, you can get or set it to define or retrieve the range of the RangedFloat. When setting this property, ensure that the Vector2 values are correctly assigned to represent the desired range.

Example

// Example of setting the RangeValue property
RangedFloat rangedFloat = new RangedFloat();
rangedFloat.RangeValue = new Vector2(1.0f, 5.0f);

// Example of getting the RangeValue property
Vector2 range = rangedFloat.RangeValue;
float minValue = range.x;
float maxValue = range.y;