public void ProcessOperatorCeil([ValueSource("ProcessOperatorCeil_Values")] float inValue)
        {
            var value             = new VFXValue <float>(inValue);
            var expression        = VFXOperatorUtility.Ceil(value);
            var context           = new VFXExpression.Context(VFXExpressionContextOption.CPUEvaluation);
            var resultExpressionA = context.Compile(expression);

            Assert.AreEqual(Mathf.Ceil(inValue), resultExpressionA.Get <float>(), 0.001f);
        }
        protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
        {
            return(new[]
            {
                VFXOperatorUtility.Saturate(VFXOperatorUtility.Ceil(inputExpression[0] - inputExpression[1])),

                // TODO : It would be nice to have inverted step output (1 if below threshold), but we need to be able to define multiple FloatN output slots.
                //VFXOperatorUtility.Clamp( new VFXExpressionFloor(inputExpression[0])-inputExpression[1], VFXValue.Constant(0.0f), VFXValue.Constant(1.0f)),
            });
        }
Exemple #3
0
 protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
 {
     return(new[] { VFXOperatorUtility.Ceil(inputExpression[0]) });
 }