Open wrobell opened 4 years ago
The code is in cprNL function is
cprNL
if lat == 87 or lat == -87: return 2
Considering that latitude is a float obtained using IEEE-754 standard, IMHO, it is highly unlikely we will hit -87/87 exactly (https://docs.python.org/3/tutorial/floatingpoint.html). Should math.isclose be used here (https://docs.python.org/3/library/math.html#math.isclose)?
math.isclose
You are absolutely right! Now fixed with commit ed18352.
The code is in
cprNL
function isConsidering that latitude is a float obtained using IEEE-754 standard, IMHO, it is highly unlikely we will hit -87/87 exactly (https://docs.python.org/3/tutorial/floatingpoint.html). Should
math.isclose
be used here (https://docs.python.org/3/library/math.html#math.isclose)?