Nodes - Added numeric subtract node

This commit is contained in:
Robert committed 2022-11-06 10:27:19 +01:00
1 parent ff633f7e8e
commit 0a3e822d03
3 files changed
+61

No files matched your search

@@ -0,0 +1,34 @@
using Artemis.Core;
namespace Artemis.VisualScripting.Nodes.Mathematics;
[Node("Subtract", "Subtracts the connected numeric values.", "Mathematics", InputType = typeof(Numeric), OutputType = typeof(Numeric))]
public class SubtractNumericsNode : Node
{
#region Constructors
public SubtractNumericsNode()
{
Values = CreateInputPinCollection<Numeric>("Values", 2);
Remainder = CreateOutputPin<Numeric>("Remainder");
}
#endregion
#region Methods
public override void Evaluate()
{
Remainder.Value = Values.Values.Subtract();
}
#endregion
#region Properties & Fields
public InputPinCollection<Numeric> Values { get; }
public OutputPin<Numeric> Remainder { get; }
#endregion
}