Пример #1
0
 public string GiveValueInSI()
 {
     Acceleration x = new Acceleration(value);
     x.distanceType = distanceType;
     x.timeType = timeType;
     Converter conv = new Converter();
     string message = conv.ConvertToSI(x).value + " m/(s^2)";
     return message;
 }
Пример #2
0
 public static Acceleration operator /(Speed v, Time t)
 {
     Acceleration a = new Acceleration(0);
     a.distanceType = v.distanceType;
     a.timeType = t.timeType;
     Converter converter = new Converter();
     a.value = converter.ConvertToSI(v).value / converter.ConvertToSI(t).value;
     return converter.ConvertFromSI(a);
 }
Пример #3
0
        public Acceleration ConvertFromSI(Acceleration x)
        {
            Acceleration newValue = new Acceleration(0);
            newValue.distanceType = x.distanceType;
            newValue.timeType = x.timeType;

            Speed v = new Speed(x.value);
            v = ConvertFromSI(v);

            Time t = new Time(1);
            t.timeType = x.timeType;
            t = ConvertFromSI(t);
            newValue.value = v.value / t.value;

            return newValue;
        }
Пример #4
0
        public Acceleration ConvertToSI(Acceleration x)
        {
            Acceleration newValue = new Acceleration(0);
            newValue.distanceType = "m";
            newValue.timeType = "s";

            Speed v=new Speed(x.value);
            v=ConvertToSI(v);
            Time t = new Time(1);
            t.timeType = x.timeType;
            newValue.value = v.value / ConvertTimeToSI(t);

            return newValue;
        }
Пример #5
0
 public static Acceleration operator -(Acceleration a1, Acceleration a2)
 {
     Acceleration a3 = new Acceleration(0);
     a3.value = a1.value - a2.value;
     return a3;
 }