public sealed class Scalar
A node in a constraint system.

Fields

Error

#
public readonly double Error

Id

#
public readonly Guid Id

Value

#
public readonly double Value

Properties

IsValid

#
public bool IsValid { get; }
Gets whether this scalar is valid. Valid scalars have numeric values.

Unset

#
public static Scalar Unset { get; }
Gets an unset scalar.

Methods

Create

#
public static Scalar Create(double value, double error = 0)
Create a new scalar.
value (double)Numeric value.
error (double = 0)Error.

WithValue

#
public Scalar WithValue(double value, double error = NaN)
Move this node in space to a new location. Be careful when modifying fixed nodes, it is not always desired.
value (double)
error (double = NaN)

Convertors

OperationResultDescription
implicitScalarGuidAuto-convert a scalar to its ID.