Arc-Cosine#
Math / Trigonometry / Arc-Cosine
Can Read
Cannot Write
Description#
Returns the arc-cosine value of the number
Note
The angle in radians whose cosine is the specified number
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Arc-Cosine")]
[Category("Math/Trigonometry/Arc-Cosine")]
[Description("Returns the arc-cosine value of the number")]
[Image(typeof(IconCos), ColorTheme.Type.Yellow, typeof(BadgeDot))]
[Note("The angle in radians whose cosine is the specified number")]
[Keywords("Acos", "Arc", "Cosine")]
[Serializable]
public class TypeNumberMathAcos : TypeNumber
{
[SerializeField] private GetNumber m_Number = new GetNumber();
public override double GetPreview(GameObject source) => Math.Acos(this.m_Number.GetPreview(source));
public override double Get(Args args)
{
double number = this.m_Number.Get(args);
return Math.Acos(number);
}
public override string ToString()
{
return $"Acos({this.m_Number})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}