Correct DoF handling
Created originally on Bitbucket by garry23 (Garry George)
Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.
Following a few posts and seeing Alex's version, this simplified version correctly handles dof, ie near and far collapse to the focus point, as they should, at the diffraction limit. Near and Far are measured from the sensor. They would collapse to zero if they were relative to the focus point, which they are not.
Note I have not made any use of Alex's flags.