Table of Contents

Struct WeightedRelation

Namespace
Nalu.Cassowary
Assembly
Nalu.Maui.Layouts.dll

This is part of the syntactic sugar used for specifying constraints. This enum should be used as part of a constraint expression. See the module documentation for more information.

public readonly record struct WeightedRelation : IEquatable<WeightedRelation>
Implements
Inherited Members

Constructors

WeightedRelation(RelationalOperator, double)

This is part of the syntactic sugar used for specifying constraints. This enum should be used as part of a constraint expression. See the module documentation for more information.

public WeightedRelation(RelationalOperator Operator, double Strength)

Parameters

Operator RelationalOperator

The RelationalOperator.

Strength double

The Strength.

Properties

Operator

public RelationalOperator Operator { get; init; }

Property Value

RelationalOperator

Strength

The Strength.

public double Strength { get; init; }

Property Value

double

Methods

Eq(double)

Create new WeightedRelation with Equal.

public static WeightedRelation Eq(double strength)

Parameters

strength double

The Strength value.

Returns

WeightedRelation

New WeightedRelation instance with Operator as Equal and Strength as strength.

GreaterOrEq(double)

public static WeightedRelation GreaterOrEq(double strength)

Parameters

strength double

The strength

Returns

WeightedRelation

New WeightedRelation instance with Operator as LessThanOrEqual and Strength as strength.

LessOrEq(double)

public static WeightedRelation LessOrEq(double strength)

Parameters

strength double

The Strength value.

Returns

WeightedRelation

New WeightedRelation instance with Operator as LessThanOrEqual and Strength as strength.

Operators

operator |(double, WeightedRelation)

public static PartialConstraint operator |(double strength, WeightedRelation relation)

Parameters

strength double

The strength.

relation WeightedRelation

The WeightedRelation.

Returns

PartialConstraint

New PartialConstraint instance.

operator |(float, WeightedRelation)

public static PartialConstraint operator |(float strength, WeightedRelation relation)

Parameters

strength float

The strength.

relation WeightedRelation

The WeightedRelation.

Returns

PartialConstraint

New PartialConstraint instance.