avocado/packages/math/test/vertice.js

11 lines
347 B
JavaScript
Raw Normal View History

2022-03-11 05:08:59 -06:00
import {Vertice} from '@avocado/math';
2021-03-19 09:05:51 -05:00
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);
});
});