Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

parse3Rat2 returns NaN rather than error or 0.0 #7

Open
ehalpern opened this issue Jul 17, 2017 · 1 comment
Open

parse3Rat2 returns NaN rather than error or 0.0 #7

ehalpern opened this issue Jul 17, 2017 · 1 comment

Comments

@ehalpern
Copy link

I've encountered several photos that have an exif LatLong entry (encoded as rationals) where one or both of the coordinates have numerator == denominator == 0. In this case exif.LatLong() returns NaN for the offending point(s).

If would be helpful if this case were handled more directly. Perhaps you could return an error in any case where the denominator is 0. Additionally, you could interpret any rational with a 0 numerator as 0.0.

@xor-gate
Copy link
Owner

xor-gate commented Jul 17, 2017

Feel free to suggest a patch as Pull Request, I prefer also with a unit test picture.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants