Commit 1b416fb
committed
Fix moronic light grid array size calculation
First it calculated the number of points along the negative
and positive axes of a dimension of the light grid. Then, instead
of just adding those two together to determine the total number of
points on the axis, it calculated the coordinates of the minimum and
maximum points, subtracted them, and divided by the cell size to
get the number of points on the axis. This division was floored, not
rounded, so if the difference in coordinates had an error of -0.000001
it would get the wrong answer.
Surprising that this didn't break earlier.
Fixes #1518.1 parent 98b3dbb commit 1b416fb
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4026 | 4026 | | |
4027 | 4027 | | |
4028 | 4028 | | |
4029 | | - | |
4030 | 4029 | | |
4031 | 4030 | | |
4032 | 4031 | | |
| |||
4065 | 4064 | | |
4066 | 4065 | | |
4067 | 4066 | | |
4068 | | - | |
4069 | | - | |
4070 | | - | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
| 4077 | + | |
| 4078 | + | |
| 4079 | + | |
| 4080 | + | |
4071 | 4081 | | |
4072 | 4082 | | |
4073 | 4083 | | |
| |||
0 commit comments