13 lines
305 B
C#
13 lines
305 B
C#
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)));
|
|
}
|
|
}
|