|
2 | 2 | // Copyright 2013 Andreas Gullberg Larsen ([email protected]). Maintained at https://github.com/angularsen/UnitsNet.
|
3 | 3 |
|
4 | 4 | using System;
|
| 5 | +using UnitsNet.Units; |
5 | 6 |
|
6 | 7 | namespace UnitsNet
|
7 | 8 | {
|
@@ -92,24 +93,28 @@ public static explicit operator Duration(TimeSpan duration)
|
92 | 93 | return timeSpan.TotalSeconds >= duration.Seconds;
|
93 | 94 | }
|
94 | 95 |
|
95 |
| - /// <summary>Get <see cref="Volume"/> from <see cref="Duration"/> times <see cref="VolumeFlow"/>.</summary> |
| 96 | + /// <summary>Get <see cref="Volume"/> from <see cref="Duration"/> multiplied by <see cref="VolumeFlow"/>.</summary> |
96 | 97 | public static Volume operator *(Duration duration, VolumeFlow volumeFlow)
|
97 | 98 | {
|
98 | 99 | return Volume.FromCubicMeters(volumeFlow.CubicMetersPerSecond * duration.Seconds);
|
99 | 100 | }
|
100 | 101 |
|
101 |
| - /// <summary>Calculate <see cref="ElectricCharge"/> from <see cref="Duration"/> multiplied by <see cref="ElectricCurrent"/>.</summary> |
| 102 | + /// <summary>Get <see cref="ElectricCharge"/> from <see cref="Duration"/> multiplied by <see cref="ElectricCurrent"/>.</summary> |
102 | 103 | public static ElectricCharge operator *(Duration time, ElectricCurrent current)
|
103 | 104 | {
|
104 | 105 | return ElectricCharge.FromAmpereHours(current.Amperes * time.Hours);
|
105 | 106 | }
|
106 | 107 |
|
107 |
| - /// <summary> |
108 |
| - /// Multiply <see cref="Duration"/> and <see cref="Acceleration"/> to get <see cref="Speed"/>. |
109 |
| - /// </summary> |
| 108 | + /// <summary>Get <see cref="Speed"/> from <see cref="Duration"/> multiplied by <see cref="Acceleration"/>.</summary> |
110 | 109 | public static Speed operator *(Duration duration, Acceleration acceleration)
|
111 | 110 | {
|
112 |
| - return new Speed(acceleration.MetersPerSecondSquared * duration.Seconds, UnitsNet.Units.SpeedUnit.MeterPerSecond); |
| 111 | + return new Speed(acceleration.MetersPerSecondSquared * duration.Seconds, SpeedUnit.MeterPerSecond); |
| 112 | + } |
| 113 | + |
| 114 | + /// <summary>Get <see cref="Force"/> from <see cref="Duration"/> multiplied by <see cref="ForceChangeRate"/>.</summary> |
| 115 | + public static Force operator *(Duration duration, ForceChangeRate forceChangeRate) |
| 116 | + { |
| 117 | + return new Force(forceChangeRate.NewtonsPerSecond * duration.Seconds, ForceUnit.Newton); |
113 | 118 | }
|
114 | 119 | }
|
115 | 120 | }
|
0 commit comments