Scripting API

Scripting API

FieldRange

Record struct in Abyss.Core, from Abyss.Core.

The two ends of a slider.

public readonly record struct FieldRange

Constructors

FieldRange

public FieldRange(double Min, double Max)

The two ends of a slider.

Parameters

  • Min: The smallest value it reaches.
  • Max: The largest value it reaches.

Properties

Min

public double Min { get; init; }

The smallest value it reaches.

Max

public double Max { get; init; }

The largest value it reaches.

IsValid

public bool IsValid { get; }

Whether it can bound anything: two finite numbers, the smaller first.

Methods

For

public FieldRange? For(FieldKind kind)

What it becomes on a field of kind.

Parameters

  • kind: The field's kind.

The same range on a whole-number field is the whole numbers inside it, so a slider cannot rest where the field cannot, and a value held inside it stays inside once stored. Null when there are none, which registration refuses.

Clamp

public double Clamp(double value)

The nearest value inside it.

Parameters

  • value: Any number.