@@ -161,23 +161,43 @@ public override bool Equals(object obj) {
161
161
return new ImperialDistance ( a . _inches + b . _inches ) ;
162
162
}
163
163
164
+ public static ImperialDistance Add ( ImperialDistance a , ImperialDistance b )
165
+ {
166
+ return a + b ;
167
+ }
168
+
164
169
public static ImperialDistance operator - ( ImperialDistance a , ImperialDistance b ) {
165
170
if ( a == null ) throw new ArgumentNullException ( "a" ) ;
166
171
if ( b == null ) throw new ArgumentNullException ( "b" ) ;
167
172
return new ImperialDistance ( a . _inches - b . _inches ) ;
168
173
}
169
174
175
+ public static ImperialDistance Subtract ( ImperialDistance a , ImperialDistance b )
176
+ {
177
+ return a - b ;
178
+ }
179
+
170
180
public static ImperialDistance operator * ( ImperialDistance a , ImperialDistance b ) {
171
181
if ( a == null ) throw new ArgumentNullException ( "a" ) ;
172
182
if ( b == null ) throw new ArgumentNullException ( "b" ) ;
173
183
return new ImperialDistance ( a . _inches * b . _inches ) ;
174
184
}
175
185
186
+ public static ImperialDistance Multiply ( ImperialDistance a , ImperialDistance b )
187
+ {
188
+ return a * b ;
189
+ }
190
+
176
191
public static ImperialDistance operator / ( ImperialDistance a , ImperialDistance b ) {
177
192
if ( a == null ) throw new ArgumentNullException ( "a" ) ;
178
193
if ( b == null ) throw new ArgumentNullException ( "b" ) ;
179
194
return new ImperialDistance ( a . _inches / b . _inches ) ;
180
195
}
196
+
197
+ public static ImperialDistance Divide ( ImperialDistance a , ImperialDistance b )
198
+ {
199
+ return a / b ;
200
+ }
181
201
}
182
202
183
203
//Extension methods must be defined in a static class
@@ -229,6 +249,11 @@ public static class AnimationCurveExtension
229
249
// and specifies the type for which the method is defined.
230
250
public static void Dump ( this AnimationCurve animCurve , string message = "" , float [ ] keyTimesExpected = null , float [ ] keyValuesExpected = null )
231
251
{
252
+ if ( animCurve == null )
253
+ {
254
+ throw new System . ArgumentNullException ( "animCurve" ) ;
255
+ }
256
+
232
257
int idx = 0 ;
233
258
foreach ( var key in animCurve . keys ) {
234
259
if ( keyTimesExpected != null && keyValuesExpected != null && keyTimesExpected . Length == keyValuesExpected . Length ) {
0 commit comments