equal
deleted
inserted
replaced
319 |
319 |
320 procedure CalcRotationDirAngle(Gear: PGear); |
320 procedure CalcRotationDirAngle(Gear: PGear); |
321 var |
321 var |
322 dAngle: real; |
322 dAngle: real; |
323 begin |
323 begin |
324 dAngle := (Gear^.dX.QWordValue + Gear^.dY.QWordValue) / $80000000; |
324 // Frac/Round to be kind to JS as of 2012-08-27 where there is yet no int64/uint64 |
|
325 dAngle := (Gear^.dX.Round + Gear^.dY.Round) / 2 + (Gear^.dX.Frac+Gear^.dY.Frac) / $80000000; |
325 if not Gear^.dX.isNegative then |
326 if not Gear^.dX.isNegative then |
326 Gear^.DirAngle := Gear^.DirAngle + dAngle |
327 Gear^.DirAngle := Gear^.DirAngle + dAngle |
327 else |
328 else |
328 Gear^.DirAngle := Gear^.DirAngle - dAngle; |
329 Gear^.DirAngle := Gear^.DirAngle - dAngle; |
329 |
330 |