Пример #1
0
 public static Distance operator *(Time time, Speed speed)
 {
     Distance distance = new Distance();
     distance.Value = time.Value * speed.Value;
     return distance;
 }
Пример #2
0
 public Distance Sqrt(Square S)
 {
     Distance distance = new Distance();
     distance.Value = Math.Sqrt(S.Value);
     return distance;
 }
Пример #3
0
 public static Distance operator /(Square square, Distance d)
 {
     Distance distance = new Distance();
     distance.Value = square.Value / d.Value;
     return distance;
 }
Пример #4
0
 public Square Pow(Distance distance)
 {
     Square square = new Square();
     square.Value = Math.Pow(distance.Value, 2);
     return square;
 }
Пример #5
0
 public static Distance operator -(Distance distance1, Distance distance2)
 {
     Distance distance = new Distance();
     distance.Value = distance1.Value - distance2.Value;
     return distance;
 }