RangedFloatclass

A float between two values, which can be randomized or fixed.

objectRangedFloat
Namespace
global
Assembly
Sandbox.System
Declaration
public sealed struct RangedFloat

Constructors2

Showing 2 constructors

Methods3

Showing 3 methods

public void Deconstruct(float min, float max)PUBLIC

ParameterTypeDescription
minfloat
maxfloat
Returns:void

public float GetValue()PUBLIC

Returns the final value of this ranged float, randomizing between min and max values.

Returns:float

public static RangedFloat Parse(string str)PUBLICSTATIC

Parse a ranged float from a string. Format is `"min[ max]"`.

ParameterTypeDescription
strstring
Returns:RangedFloat

Properties5

Showing 5 properties

public float RangedFloat.FixedValue { get; set; }PUBLICGETSET

The fixed value. Setting this will convert us to a fixed value

Returns:float

public float RangedFloat.Max { get; set; }PUBLICGETSET

The maximum value of the float range. For `RangedFloat.RangeType.Fixed`, this will be the same as `RangedFloat.Min`.

Returns:float

public float RangedFloat.Min { get; set; }PUBLICGETSET

The minimum value of the float range.

Returns:float

public Vector2 RangedFloat.RangeValue { get; set; }PUBLICGETSET

The range value. Setting this will convert us to a range value

Returns:Vector2

On this page