mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Nodes - Added numeric subtract node
This commit is contained in:
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
|
||||
}
|
||||
Reference in new issue
Block a user