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)); }
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)); }