There seem to be some weird bug in excel.
Below is the Rotation test from one of my rotation tests.
Start Shot Time U Cast E CD until
0.00 Serpent Sting 1.65 1.65 21.15
1.65 Chimera Shot 1.65 3.30 11.80
3.30 Aimed Shot 1.65 4.95 13.45
4.95 Steady Shot 1.79 6.74 6.60
6.60 Steady Shot 1.79 8.39 8.25
8.25 Steady Shot 1.79 10.04 9.90
9.90 Steady Shot 1.79 11.69 11.55
11.80 Chimera Shot 1.65 13.45 21.95 (Waited 0.25s)
13.45 Aimed Shot 1.65 15.10 23.60
15.10 Steady Shot 1.79 16.89 16.75
16.75 Steady Shot 1.79 18.54 18.40
18.40 Steady Shot 1.79 20.19 20.05
20.05 Steady Shot 1.79 21.84 21.70
21.95 Chimera Shot 1.65 23.60 32.10 (Waited 0.25s)
23.60 Steady Shot 1.79 25.39 25.25
25.25 Aimed Shot 1.65 26.90 35.40
26.90 Steady Shot 1.79 28.69 28.55
The "CD until" for the Aimed Shot is listed as 23.60.
The code in VB that makes the control is
If haveShot = 0 And ShotTable(i, 2) <= currentTime + And ShotTable(i, 1) <> "None" Then
Using "<=" it should pick the Aimed shot... but it does not.
Iamcal, that made the last major update to the Rawr wow simulator (major Update made in the v2.2.14 release), where he made the hunter module copy the spreadsheets calculations as close as possible (to the current v91e spreadsheet) noticed the same challenge while programming in C#.
He solved it by an "ugly" hack.
Snipet from Rawr code
// this is a horrible round hack, i know. the issue probably comes
// somewhere from a float->double cast.
// the issue is that we have currentTime at (e.g.) 65.35 and steady shot CD is at 65.3500000001
// so we skip forward by 0.1 seconds when we didn;t really need to.
if (!haveShot && s.time_until_off_cd <= currentTime+0.00001)
{
Adding the "+0.00001" to the spreadsheets code seem to solve the problem as well.
If haveShot = 0 And ShotTable(i, 2) <= (currentTime + 0.00001) And ShotTable(i, 1) <> "None" Then
I have no idea what causes the problem. When debugging the VB code and adding watches... both variables shows 23.6.
I also tried to have the currenttime variable dim'ed as variant as well... but that did not help.