using System; using UnityEngine; [DisallowMultipleComponent] public sealed class CosineBehavior : GuardedValueNodeBehavior { protected override void RecomputeCore() { double d = GetInputNumber("Degrees") * (Math.PI / 180.0); SetOutputValueIfChanged("Output", BSValue.FromNumber(Math.Cos(d))); } }