コード例 #1
0
        public override double ConvertDistanceToKilometers(double distance)
        {
            if (ContainsEnglishUnits)
            {
                return(ConvertDistance.MilesToKilometers(distance));
            }

            return(distance);
        }
コード例 #2
0
        public override double ConvertSpeedToKilometersPerHour(double speed)
        {
            if (ContainsEnglishUnits)
            {
                // m/h * k/m
                return(ConvertDistance.MilesToKilometers(speed));
            }

            return(speed);
        }