Skip to main content

CurveRange<T>

A class in Root.Township, Alta.

A topic with two values and an animation curve, evaluated across the range between the values. Base of AttributeCurveRange for biome attributes.

Constructors​

MemberWhat it is
CurveRange()Creates a CurveRange from topic, curve, value1 and value2.
CurveRange(T topic, AnimationCurve curve, float value1, float value2)Creates a CurveRange from topic, curve, value1 and value2.

Fields​

1 private and internal field
MemberWhat it is
private AnimationCurve curveBacking field for Curve.

Properties​

MemberWhat it is
AnimationCurve Curve { get; }The curve; defaults to 0 at both ends and 1 in the middle.

Methods​

MemberWhat it is
float EvaluateAsMinMax(float value)Maps the value to 0 to 1 between the two values and evaluates the curve there.