Merge pull request #4259 from marcjansen/math-radians-degrees

Remove use of toDegrees/toRadians util functions
This commit is contained in:
Marc Jansen
2015-10-12 23:27:20 +02:00
9 changed files with 81 additions and 33 deletions

View File

@@ -196,4 +196,31 @@ describe('ol.math.tanh', function() {
});
describe('ol.math.toDegrees', function() {
it('returns the correct value at -π', function() {
expect(ol.math.toDegrees(-Math.PI)).to.be(-180);
});
it('returns the correct value at 0', function() {
expect(ol.math.toDegrees(0)).to.be(0);
});
it('returns the correct value at π', function() {
expect(ol.math.toDegrees(Math.PI)).to.be(180);
});
});
describe('ol.math.toRadians', function() {
it('returns the correct value at -180', function() {
expect(ol.math.toRadians(-180)).to.be(-Math.PI);
});
it('returns the correct value at 0', function() {
expect(ol.math.toRadians(0)).to.be(0);
});
it('returns the correct value at 180', function() {
expect(ol.math.toRadians(180)).to.be(Math.PI);
});
});
goog.require('ol.math');