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

Min#

Math / Min

  • Can Read

  • Cannot Write

Description#

Returns a vector that is made from the smallest components of two vectors

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Min")]
    [Category("Math/Min")]
    [Description("Returns a vector that is made from the smallest components of two vectors")]
    
    [Image(typeof(IconLessThan), ColorTheme.Type.Yellow)]
    [Keywords("Vector")]
    
    [Serializable]
    public class TypeVector3MathMin : TypeVector3
    {
        [SerializeField] private GetVector3 m_VectorA = new GetVector3();
        
        [SerializeField] private GetVector3 m_VectorB = new GetVector3();

        public override Vector3 GetPreview(GameObject source) =>
            Vector3.Min(this.m_VectorA.GetPreview(source), this.m_VectorB.GetPreview(source));

        public override Vector3 Get(Args args)
        {
            return Vector3.Min(
                this.m_VectorA.Get(args),
                this.m_VectorB.Get(args)
            );
        }
        
        public override string ToString()
        {
            return $"Min ({this.m_VectorA}, {this.m_VectorB})";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.