blob: f364681b9b3d84eaa563d82ff827203f2c0fd845 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Tests vec.js, in its main functionality---.elem()
const vec = require('../utils/vec');
coord1 = [-22, 23];
coord2 = [25, 25];
console.log('add', vec.add(coord1, coord2));
console.log('sub', vec.sub(coord1, coord2));
console.log('min', vec.elem(coord1, coord2, (a,b) => Math.min(a,b)));
|