struct
RangedFloat
public sealed struct RangedFloat A float between two values, which can be randomized or fixed.
Constructors
RangedFloat(Single fixedValue) Initialize the float as a fixed value.
RangedFloat(Single min, Single max) Initialize the float as a random value between given min and max.
min — The minimum possible value for this float. max — The maximum possible value for this float. Properties
| Name | Type | Description |
|---|---|---|
Min | Single | The minimum value of the float range. |
Max | Single | The maximum value of the float range. For Fixed, this will be the same as Min. |
FixedValue | Single | The fixed value. Setting this will convert us to a fixed value |
RangeValue | Vector2 | The range value. Setting this will convert us to a range value |
Range | RangeType | Range type of this float. |
Methods
Single GetValue() Returns the final value of this ranged float, randomizing between min and max values.
static RangedFloat Parse(String str) Parse a ranged float from a string. Format is "min[ max]".
Void Deconstruct(Single min, Single max) Fields
| Name | Type | Description |
|---|---|---|
x | Single | |
y | Single |
Assembly:
Sandbox.System Full Name: RangedFloat