예제 #1
0
 public static Speed operator -(Speed speed1, Speed speed2)
 {
     Speed speed = new Speed();
     speed.Value = speed1.Value - speed2.Value;
     return speed;
 }
예제 #2
0
파일: Time.cs 프로젝트: alena-butkevich/OOP
 public static Speed operator *(Time time, Acceleration acceleration)
 {
     Speed speed = new Speed();
     speed.Value = acceleration.Value * time.Value;
     return speed;
 }
예제 #3
0
 public static Speed operator /(Distance distance, Time time)
 {
     Speed speed = new Speed();
     speed.Value = distance.Value / time.Value;
     return speed;
 }