Пример #1
0
 private static void CalculateSimpleAverage(RewriteDesign design, TypedValueBridge selectionValue, LocalVariable sumVariable)
 {
     if (!AssertResultSizeGreaterEqual(design, 1))
     {
         return;
     }
     design.ForAdd(sumVariable.AddAssign(selectionValue));
     design.ResultAdd(Return(sumVariable / design.GetResultSize()));
 }
Пример #2
0
 public static bool AssertResultSizeLesser(RewriteDesign design, ValueBridge bigger, bool preCheck = false)
 => AssertLesser(design, design.GetResultSize(), bigger, design.ResultSize != null, preCheck);
Пример #3
0
 public static bool AssertResultSizeGreater(RewriteDesign design, ValueBridge smaller, bool preCheck = false)
 => AssertLesser(design, smaller, design.GetResultSize(), design.ResultSize != null, preCheck);