Class ApproximatelyEqual
Compares two numbers to determine if they are approximately equal (disregarding floating point precision errors).
Inherited Members
Namespace: Unity.VisualScripting
Syntax
[UnitCategory("Logic")]
[UnitShortTitle("Equal")]
[UnitSubtitle("(Approximately)")]
[UnitOrder(7)]
[Obsolete("Use the Equal unit with Numeric enabled instead.")]
public sealed class ApproximatelyEqual : Unit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable
Properties
a
The first number.
Declaration
[DoNotSerialize]
public ValueInput a { get; }
Property Value
| Type | Description |
|---|---|
| ValueInput |
b
The second number.
Declaration
[DoNotSerialize]
public ValueInput b { get; }
Property Value
| Type | Description |
|---|---|
| ValueInput |
equal
Whether A is approximately equal to B.
Declaration
[DoNotSerialize]
[PortLabel("A ≈ B")]
public ValueOutput equal { get; }
Property Value
| Type | Description |
|---|---|
| ValueOutput |
Methods
Comparison(Flow)
Declaration
public bool Comparison(Flow flow)
Parameters
| Type | Name | Description |
|---|---|---|
| Flow | flow |
Returns
| Type | Description |
|---|---|
| Boolean |
Definition()
Declaration
protected override void Definition()