A suite to track Project Diva score statistics and ratings / D4DJ event data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
projectdivar/server/node_modules/clip-pixels/test.js

32 lines
424 B

'use strict'
var clip = require('./')
var a = require('assert')
var pixels = [
0, 1, 0,
1, 1, 1,
0, 1, 0
]
a.deepEqual(clip(pixels, [3, 3, 1], [1, 0, 2, 3]),
[
1, 0,
1, 1,
1, 0
])
// short args
var pixels = [
0,0,0,0, 1,1,1,1, 0,0,0,0,
1,1,1,1, 1,1,1,1, 1,1,1,1,
0,0,0,0, 1,1,1,1, 0,0,0,0
]
a.deepEqual(clip(pixels, [3], [1, 0]),
[
1,1,1,1, 0,0,0,0,
1,1,1,1, 1,1,1,1,
1,1,1,1, 0,0,0,0
])