Closed jonyrock closed 4 years ago
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.
Well, maybe we can close this issue, but in me world:
180 \in [-180, 180]
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 (https://github.com/mjaschen/phpgeo/issues/70#issuecomment-657103198).
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<=
https://github.com/mjaschen/phpgeo/blob/3a03fe3df865cac5aa8a6383052b29eda2137098/src/Coordinate.php#L177