Ejemplo n.º 1
0
        public override void TryAndProcess()
        {
            if (!input.IsValid)
            {
                return;
            }

            NodeType t = input.Reference.Type;

            try
            {
                if (t == NodeType.Float2 || t == NodeType.Float3 || t == NodeType.Float4)
                {
                    MVector v = (MVector)input.Data;
                    output.Data = v.Fract();
                }
                else if (t == NodeType.Float)
                {
                    float f = input.Data.ToFloat();
                    output.Data = f - (float)Math.Floor(f);
                }

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

            UpdateOutputType();
        }