Struct Range ​
Namespace: ValveResourceFormat.Animation
Assembly: ValveResourceFormat.dll
A range of floats between two bounds.
public record struct Range : IEquatable<Range>Implements ​
Constructors ​
Range(float, float) ​
A range of floats between two bounds.
public Range(float Min, float Max)Parameters ​
Min float
The lower bound.
Max float
The upper bound.
Range(KVObject) ​
Reads a range from its compiled data.
public Range(KVObject data)Parameters ​
data KVObject
Range(float) ​
Creates an empty range at a single value.
public Range(float singleValue)Parameters ​
singleValue float
Properties ​
IsSet ​
Gets whether the range spans any distance.
public readonly bool IsSet { get; }Property Value ​
bool
Length ​
Gets the distance between the bounds.
public readonly float Length { get; }Property Value ​
float
Max ​
The upper bound.
public float Max { readonly get; set; }Property Value ​
float
Min ​
The lower bound.
public float Min { readonly get; set; }Property Value ​
float
Methods ​
ContainsInclusive(float) ​
Gets whether a value lies within the range, bounds included.
public readonly bool ContainsInclusive(float value)Parameters ​
value float
Returns ​
bool
GetClampedValue(float) ​
Clamps a value into the range.
public readonly float GetClampedValue(float input)Parameters ​
input float
Returns ​
float
GetPercentageThrough(float) ​
Gets how far through the range a value is, which is outside 0 to 1 for a value outside the range.
public readonly float GetPercentageThrough(float input)Parameters ​
input float
Returns ​
float
GetPercentageThroughClamped(float) ​
Gets how far through the range a value is, from 0 to 1, after clamping it into the range.
public readonly float GetPercentageThroughClamped(float input)Parameters ​
input float
Returns ​
float

