cleaned up some code for distanceToCamera()
code cleanup