Loading app/src/js/AstroMath.js +11 −2 Original line number Diff line number Diff line Loading @@ -103,13 +103,22 @@ export default class AstroMath { if (projection === "EPSG:4326") { convertedLon -= 180; } if (convertedLon < 0) { convertedLon += 180; if (projection == "EPSG:4326") { convertedLon += 360; } else { convertedLon += 180; } } else if (projection != "EPSG:4326") { convertedLon += 180; } return convertedLon; } Loading app/test/AstroMath_test.js +2 −2 Original line number Diff line number Diff line Loading @@ -57,10 +57,10 @@ describe('Testing AstroMath Functions', function() { }) // testing lonTo360 function it('Testing lonTo360 Non-Cylindrical: -180 should be 180 ', function() { it('Testing lonTo360 Non-Cylindrical: -180 should be 0 ', function() { // add an assertion let majorRadius = testMath.lonTo360(-180, ""); expect(majorRadius).to.equal(180); expect(majorRadius).to.equal(0); }) // testing domainToPositiveWest function Loading Loading
app/src/js/AstroMath.js +11 −2 Original line number Diff line number Diff line Loading @@ -103,13 +103,22 @@ export default class AstroMath { if (projection === "EPSG:4326") { convertedLon -= 180; } if (convertedLon < 0) { convertedLon += 180; if (projection == "EPSG:4326") { convertedLon += 360; } else { convertedLon += 180; } } else if (projection != "EPSG:4326") { convertedLon += 180; } return convertedLon; } Loading
app/test/AstroMath_test.js +2 −2 Original line number Diff line number Diff line Loading @@ -57,10 +57,10 @@ describe('Testing AstroMath Functions', function() { }) // testing lonTo360 function it('Testing lonTo360 Non-Cylindrical: -180 should be 180 ', function() { it('Testing lonTo360 Non-Cylindrical: -180 should be 0 ', function() { // add an assertion let majorRadius = testMath.lonTo360(-180, ""); expect(majorRadius).to.equal(180); expect(majorRadius).to.equal(0); }) // testing domainToPositiveWest function Loading