Move ol.geom.flatLinearRingIsClockwise into ol.geom.flat

This commit is contained in:
Tom Payne
2013-11-12 12:44:13 +01:00
parent 857c28a88b
commit 0aa0cfd54b
3 changed files with 29 additions and 29 deletions

View File

@@ -54,18 +54,18 @@ describe('ol.geom.flat', function() {
});
describe('ol.geom.flatLinearRingIsClockwise', function() {
describe('ol.geom.flat.linearRingIsClockwise', function() {
it('identifies clockwise rings', function() {
var flatCoordinates = [0, 1, 1, 4, 4, 3, 3, 0];
var isClockwise = ol.geom.flatLinearRingIsClockwise(
var isClockwise = ol.geom.flat.linearRingIsClockwise(
flatCoordinates, 0, flatCoordinates.length, 2);
expect(isClockwise).to.be(true);
});
it('identifies anti-clockwise rings', function() {
var flatCoordinates = [2, 2, 3, 2, 3, 3, 2, 3];
var isClockwise = ol.geom.flatLinearRingIsClockwise(
var isClockwise = ol.geom.flat.linearRingIsClockwise(
flatCoordinates, 0, flatCoordinates.length, 2);
expect(isClockwise).to.be(false);
});