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