Exemple #1
0
        private static void CheckForZero(Complex a, Complex b)
        {
            if (!(b.Modulus() < Eps))
            {
                return;
            }

            var args = new DivideByZero {
                Dividend = a, Divider = b
            };

            a.DivideByZeroEvent?.Invoke(a, args);
        }
Exemple #2
0
 public static void DbZEvent(object obj, DivideByZero args)
 {
     throw new DivideByZeroException("Divide by zero");
 }