コード例 #1
0
        public override void TryAndProcess()
        {
            if (!input.IsValid)
            {
                return;
            }

            NodeType t = input.Reference.Type;

            try
            {
                if (t == NodeType.Float4 || t == NodeType.Float3 || t == NodeType.Float2)
                {
                    MVector v = (MVector)input.Data;
                    output.Data = v.Ceil();
                }
                else
                {
                    float v = input.Data.ToFloat();
                    output.Data = (float)Math.Ceiling(v);
                }

                result = output.Data?.ToString();
            }
            catch (Exception e)
            {
                Log.Error(e);
            }

            UpdateOutputType();
        }