That's quite possible, I haven't been through whole method flow, so I'm not sure how `float(NAN)` would be handled later on. Might be an exception? But still, not sure if it's sensible - all distances can be calculated.

Seems more readable to have `0.0` instead of a cast, though.

What do you think?