Mon May 30 04:35:07 2022 by Ron Vantreese |
Hi Mr. Torben, there appears to be a risk of division by zero in the Mercator map. y = sin(lat); y = (1.0+y)/(1.0-y); If user enters 90 degrees latitude, then y starts with value 1, the next line becomes y = 2 / 0. |
Mon May 30 04:41:54 2022 by Ron Vantreese |
There appears to be another risk of Log of 0 if user enters -90. y = 0.5*log(y); |
Mon May 30 11:48:16 2022 by Torben |
The Mercator projection is not defined for +/- 90 degrees, so an error is appropriate. But it might be better to cap the latitude to, say, -89 to 89 degrees. |