Files
2026-06-01 17:19:55 +02:00

17 lines
331 B
C#

using System;
using UnityEngine;
[DisallowMultipleComponent]
public sealed class SquareRootBehavior : GuardedValueNodeBehavior
{
protected override void RecomputeCore()
{
double num = GetInputNumber("Value");
if (num < 0.0)
{
num = 0.0;
}
SetOutputValueIfChanged("Output", BSValue.FromNumber(Math.Sqrt(num)));
}
}