Beispiel #1
0
        public ConvertedUnits CelsiusToFahrenheit(double c)
        {
            ConvertedUnits cu = new ConvertedUnits();

            cu.Celsius    = c;
            cu.Fahrenheit = c * 9 / 5 + 32;

            return(cu);
        }
Beispiel #2
0
        public ConvertedUnits FahrenheitToCelsius(double f)
        {
            ConvertedUnits cu = new ConvertedUnits();

            cu.Fahrenheit = f;
            cu.Celsius    = (f - 32.0) / 1.8;

            return(cu);
        }
Beispiel #3
0
        public ConvertedUnits LinearMeasure(double m)
        {
            ConvertedUnits cu = new ConvertedUnits();

            cu.Metr = m;
            cu.Inch = m * 39.3700787;
            cu.Foot = m * 3.2808399;
            cu.Yard = m * 1.0936133;

            return(cu);
        }