コード例 #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));
        }
コード例 #2
0
ファイル: Unit.cs プロジェクト: veggerby/Veggerby.Units
        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));
        }