Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Sine#

Math / Trigonometry / Sine

  • Can Read

  • Cannot Write

Description#

Returns the sine angle of the number

Note

The angle in radians whose sine is the specified number

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Sine")]
    [Category("Math/Trigonometry/Sine")]
    
    [Description("Returns the sine angle of the number")]
    [Image(typeof(IconSin), ColorTheme.Type.Yellow)]
    
    [Note("The angle in radians whose sine is the specified number")]
    
    [Keywords("Sin")]
    
    [Serializable]
    public class TypeNumberMathSin : TypeNumber
    {
        [SerializeField] private GetNumber m_Number = new GetNumber();

        public override double GetPreview(GameObject source) => Math.Sin(this.m_Number.GetPreview(source));

        public override double Get(Args args)
        {
            double number = this.m_Number.Get(args);
            return Math.Sin(number);
        }

        public override string ToString()
        {
            return $"Sin({this.m_Number})";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.