mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 16:49:40 +02:00
Remove geo.centroid(), use d3's instead
This commit is contained in:
@@ -113,20 +113,6 @@ describe('iD.Util', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#area", function() {
|
||||
it('calculates the area of a trapezoid', function() {
|
||||
var polygon = [[0, 0], [3, 0], [2, 2], [1, 2]];
|
||||
expect(iD.geo.area(polygon)).to.eql(4);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#polygonCentroid', function() {
|
||||
it('calculates the centroid of a square', function() {
|
||||
var square = [[0, 0], [0, 2], [2, 2], [2, 0]];
|
||||
expect(iD.geo.polygonCentroid(square)).to.eql([1, 1]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#pathLength', function() {
|
||||
it('calculates a simple path length', function() {
|
||||
var path = [[0, 0], [0, 1], [3, 5]];
|
||||
|
||||
Reference in New Issue
Block a user