@@ -251,7 +251,7 @@ public static explicit operator decimal(Fixed64 value)
251251 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
252252 public static Fixed64 operator + ( Fixed64 x , int y )
253253 {
254- return new Fixed64 ( ( x . m_rawValue * FixedMath . SCALE_FACTOR_D ) + y ) ;
254+ return x + ( Fixed64 ) y ;
255255 }
256256
257257 /// <summary>
@@ -260,23 +260,23 @@ public static explicit operator decimal(Fixed64 value)
260260 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
261261 public static Fixed64 operator + ( int x , Fixed64 y )
262262 {
263- return y + x ;
263+ return ( Fixed64 ) x + y ;
264264 }
265265
266266 /// <summary>
267267 /// Adds a float to x
268268 /// </summary>
269269 public static Fixed64 operator + ( Fixed64 x , float y )
270270 {
271- return new Fixed64 ( ( x . m_rawValue * FixedMath . SCALE_FACTOR_D ) + y ) ;
271+ return x + ( Fixed64 ) y ;
272272 }
273273
274274 /// <summary>
275275 /// Adds a Fixed64 to x
276276 /// </summary>
277277 public static Fixed64 operator + ( float x , Fixed64 y )
278278 {
279- return y + x ;
279+ return ( Fixed64 ) x + y ;
280280 }
281281
282282 /// <summary>
@@ -299,7 +299,7 @@ public static explicit operator decimal(Fixed64 value)
299299 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
300300 public static Fixed64 operator - ( Fixed64 x , int y )
301301 {
302- return new Fixed64 ( ( x . m_rawValue * FixedMath . SCALE_FACTOR_D ) - y ) ;
302+ return x - ( Fixed64 ) y ;
303303 }
304304
305305 /// <summary>
@@ -308,7 +308,7 @@ public static explicit operator decimal(Fixed64 value)
308308 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
309309 public static Fixed64 operator - ( int x , Fixed64 y )
310310 {
311- return new Fixed64 ( x - ( y . m_rawValue * FixedMath . SCALE_FACTOR_D ) ) ;
311+ return ( Fixed64 ) x - y ;
312312 }
313313
314314 /// <summary>
@@ -317,7 +317,7 @@ public static explicit operator decimal(Fixed64 value)
317317 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
318318 public static Fixed64 operator - ( Fixed64 x , float y )
319319 {
320- return new Fixed64 ( ( x . m_rawValue * FixedMath . SCALE_FACTOR_D ) - y ) ;
320+ return x - ( Fixed64 ) y ;
321321 }
322322
323323 /// <summary>
@@ -326,7 +326,7 @@ public static explicit operator decimal(Fixed64 value)
326326 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
327327 public static Fixed64 operator - ( float x , Fixed64 y )
328328 {
329- return new Fixed64 ( x - ( y . m_rawValue * FixedMath . SCALE_FACTOR_D ) ) ;
329+ return ( Fixed64 ) x - y ;
330330 }
331331
332332 /// <summary>
@@ -401,15 +401,15 @@ public static explicit operator decimal(Fixed64 value)
401401 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
402402 public static Fixed64 operator * ( Fixed64 x , int y )
403403 {
404- return new Fixed64 ( ( x . m_rawValue * FixedMath . SCALE_FACTOR_D ) * y ) ;
404+ return x * ( Fixed64 ) y ;
405405 }
406406
407407 /// <summary>
408408 /// Multiplies an integer by a
409409 /// </summary>
410410 public static Fixed64 operator * ( int x , Fixed64 y )
411411 {
412- return y * x ;
412+ return ( Fixed64 ) x * y ;
413413 }
414414
415415 /// <summary>
@@ -473,7 +473,7 @@ public static explicit operator decimal(Fixed64 value)
473473 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
474474 public static Fixed64 operator / ( Fixed64 x , int y )
475475 {
476- return new Fixed64 ( ( x . m_rawValue * FixedMath . SCALE_FACTOR_D ) / y ) ;
476+ return x / ( Fixed64 ) y ;
477477 }
478478
479479 /// <summary>
0 commit comments