mirror of
https://github.com/igorski/bitmappery.git
synced 2026-07-26 00:37:43 +02:00
13 lines
372 B
JavaScript
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 }
|
|
]);
|
|
});
|
|
});
|