13 lines
303 B
C#
13 lines
303 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class SineBehavior : GuardedValueNodeBehavior
|
|
{
|
|
protected override void RecomputeCore()
|
|
{
|
|
double a = GetInputNumber("Degrees") * (Math.PI / 180.0);
|
|
SetOutputValueIfChanged("Output", BSValue.FromNumber(Math.Sin(a)));
|
|
}
|
|
}
|