30 lines
929 B
C#
30 lines
929 B
C#
using Godot;
|
|
using Nocturnis.Enigmos.Modules.ComputationalModules;
|
|
using Nocturnis.Enigmos.Ports;
|
|
using Nocturnis.GlobalManagement.Constants;
|
|
using Skeleton.DataStructure;
|
|
|
|
namespace Enigmos.Modules.ComputationalModules.Binary;
|
|
|
|
public abstract partial class MinModule : BinaryComputationalModule, IDuplicateOutputModule, IOperationModule
|
|
{
|
|
public override void Init()
|
|
{
|
|
base.Init();
|
|
this.DataOutInit("Output", 3);
|
|
this.SetInputType(EnigmosConstant.DataPortTypes.Real);
|
|
this.SetOutputType(EnigmosConstant.DataPortTypes.Real);
|
|
PostInit();
|
|
}
|
|
|
|
public override void Define()
|
|
{
|
|
(object, StringName) Func(CacheItem cache)
|
|
{
|
|
if (this.X(cache).Double < this.Y(cache).Double)
|
|
return (this.X(cache).Data!, this.X(cache).Type!);
|
|
return (this.Y(cache).Data!, this.Y(cache).Type!);
|
|
}
|
|
this.Define(Func);
|
|
}
|
|
} |