11 lines
347 B
JavaScript
11 lines
347 B
JavaScript
import {Vertice} from '@avocado/math';
|
|
import {expect} from 'chai';
|
|
|
|
describe('Vertice', () => {
|
|
it('can compute convex hull', () => {
|
|
const vertices = [[0, 0], [5, 0], [5, 5], [10, 5], [10, 10], [0, 10]];
|
|
const hull = [[0, 0], [5, 0], [10, 5], [10, 10], [0, 10]];
|
|
expect(Vertice.convexHull(vertices)).to.deep.equal(hull);
|
|
});
|
|
});
|