Commit 3771806
committed
Fix issue with angle wrap-around
The 0.8 factor was sub-optimal.
Let's assume an angular velocity of 0.3*2PI per calls of update.
Then a wrap-around will produce a change of 2PI - 0.3*2PI, that's
0.7*2PI
So it won't be detected as a wrap-around of the angle at all and
thus the number of full rotations will be off, as will be the
velocity.
The perfect number is 0.5.1 parent 1520b63 commit 3771806
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | | - | |
14 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
15 | 25 | | |
16 | 26 | | |
17 | 27 | | |
| |||
0 commit comments