Exemplo n.º 1
0
        public static Dimension operator /(Dimension dividend, Dimension divisor)
        {
            if (divisor == Dimension.None)
            {
                return(dividend);
            }

            return(OperationUtility.RearrangeDivision((x, y) => x * y, (x, y) => x / y, dividend, divisor) ??
                   OperationUtility.ReduceDivision(x => x.Multiply((a, b) => a * b, Dimension.None), (x, y) => x / y, (x, y) => x ^ y, dividend, divisor) ??
                   Div(dividend, divisor));
        }
Exemplo n.º 2
0
        public static Unit operator /(Unit dividend, Unit divisor)
        {
            if (divisor == None)
            {
                return(dividend);
            }

            return(OperationUtility.RearrangeDivision((x, y) => x * y, (x, y) => x / y, dividend, divisor) ??
                   OperationUtility.ReduceDivision(x => x.Multiply((a, b) => a * b, None), (x, y) => x / y, (x, y) => x ^ y, dividend, divisor) ??
                   Divide(dividend, divisor));
        }
Exemplo n.º 3
0
 public static Dimension operator /(int dividend, Dimension divisor)
 {
     return(OperationUtility.RearrangeDivision((x, y) => x * y, (x, y) => x / y, Dimension.None, divisor) ??
            Div(Dimension.None, divisor));
 }
Exemplo n.º 4
0
 public static Unit operator /(int dividend, Unit divisor)
 {
     return(OperationUtility.RearrangeDivision((x, y) => x * y, (x, y) => x / y, None, divisor) ??
            Divide(None, divisor));
 }