Files
bitmappery/tests/unit/math/point-math.spec.js
Igor Zinken 2f9013155f Implement continuous brushing (#6)
Implementation of continuous brushing added
2021-01-16 17:21:44 +01:00

13 lines
372 B
JavaScript

import { translatePoints } from "@/math/point-math";
describe( "Point math", () => {
it( "should be able to translate the coordinates within a list", () => {
const list = [
{ x: 10, y: 10 }, { x: 15, y: 15 }
];
expect( translatePoints( list, 5, -5 )).toEqual([
{ x: 15, y: 5 }, { x: 20, y: 10 }
]);
});
});