Пример #1
0
        public override void TryAndProcess()
        {
            if (!input.IsValid)
            {
                return;
            }
            NodeType t = input.Reference.Type;

            try
            {
                if (t == NodeType.Float)
                {
                    float f = input.Data.ToFloat();
                    output.Data = (float)Math.Sin(f);
                }
                else if (t == NodeType.Float2 || t == NodeType.Float3 || t == NodeType.Float4)
                {
                    MVector v = (MVector)input.Data;
                    output.Data = v.Sin();
                }
                result = output.Data?.ToString();
            }
            catch (Exception e)
            {
            }

            UpdateOutputType();
        }