Simplyfying

This commit is contained in:
Pascal Serrarens 2026-01-29 12:31:23 +01:00
parent d754457a14
commit b60fc19d96

View File

@ -12,8 +12,8 @@ public class MemoryCell : Neuron {
// Returns the memorized value weighted by time
// return lastValue * (current time - last time)
[SerializeField]
public bool deltaValue = false;
// [SerializeField]
// public bool deltaValue = false;
#endregion Parameters
@ -46,12 +46,12 @@ public class MemoryCell : Neuron {
public override void UpdateResult(Vector3 result) {
// output value is the previous value
if (this.deltaValue) {
float deltaTime = Time.time - this._memorizedTime;
this._outputValue = this._memorizedValue * deltaTime;
}
else
this._outputValue = this._memorizedValue;
// if (this.deltaValue) {
// float deltaTime = Time.time - this._memorizedTime;
// this._outputValue = this._memorizedValue * deltaTime;
// }
//else
this.outputValue = this._memorizedValue;
// Store the result for the next time
this._memorizedValue = result;