Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Longitude value must be numeric" bad exception #70

Closed
jonyrock opened this issue Jul 11, 2020 · 4 comments
Closed

"Longitude value must be numeric" bad exception #70

jonyrock opened this issue Jul 11, 2020 · 4 comments

Comments

@jonyrock
Copy link

I get Longitude value must be numeric -180.0 .. +180.0 (given: 180) and looks like I should be able to put 180, right?

This is because in < instead of <=

return !($value < $lower || $value > $upper);

@mjaschen
Copy link
Owner

Hi,

I've added test cases for your example and they all pass.

Can you provide more details on how to reproduce your observations?


The bounds check accepts values with an equal value as the boundary limit: If you use an longitude value of 180 the test condition in isNumericInBounds() would be

!(180 < -180.0 || 180 > 180.0)
!(false || false)
!false
true

which is the expected result.

@jonyrock
Copy link
Author

Well, maybe we can close this issue, but in me world:
image

@jonyrock
Copy link
Author

180 \in [-180, 180]

@mjaschen
Copy link
Owner

Well, maybe we can close this issue, but in me world:

Yes, 180 is in [-180, 180] and that's exactly what is checked for. I've explained the check in detail (#70 (comment)).

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

No branches or pull requests

2 participants