avocado/packages/math/test/vertice.js
2021-07-07 09:28:55 -05:00

12 lines
352 B
JavaScript

import {expect} from 'chai';
import * as Vertice from '../src/vertice';
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);
});
});