예제 #1
0
        private void Update(EvaluationContext context)
        {
            var v   = Value.GetValue(context);
            var mod = ModuloValue.GetValue(context);

            Result.Value = v - mod * (float)Math.Floor(v / mod);
        }
예제 #2
0
        private void Update(EvaluationContext context)
        {
            var v   = Value.GetValue(context);
            var mod = ModuloValue.GetValue(context);

            if (mod != 0)
            {
                Result.Value = v - mod * (float)Math.Floor(v / mod);
            }
            else
            {
                Log.Debug("Modulo caused division by zero", SymbolChildId);
                Result.Value = 0;
            }
        }