@livinglogic/livingapi 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/HOWTO-release.md +2 -2
- package/README.md +2 -2
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-static/livingapi.js +1 -1
- package/dist/esm-static/livingapi.js.map +1 -1
- package/dist/umd/livingapi.js +1 -1
- package/dist/umd/livingapi.js.map +1 -1
- package/package.json +1 -1
- package/src/livingapi.js +3 -0
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -276,6 +276,9 @@ export class Globals extends Base
|
|
|
276
276
|
const C = sqcos(G) * sqcos(l) + sqsin(F) * sqsin(l);
|
|
277
277
|
const w = Math.atan(Math.sqrt(S/C));
|
|
278
278
|
const D = 2 * w * radius;
|
|
279
|
+
if (D === 0.0)
|
|
280
|
+
/* The "correction" calculation below would fail if the raw distance is 0 */
|
|
281
|
+
return D;
|
|
279
282
|
const T = Math.sqrt(S*C)/w;
|
|
280
283
|
const H1 = (3*T-1)/(2*C);
|
|
281
284
|
const H2 = (3*T+1)/(2*S);
|