Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var x = s[i].split(' ');
- switch (x.length) {
- case 1: x[1] = x[2] = x[3] = x[0]; break;
- case 2: x[2] = x[0]; x[3] = x[1]; break;
- case 3: x[3] = x[1]; break;
- }
- return {
- top : parseInt(x[0],10),
- right : parseInt(x[1],10),
- bottom: parseInt(x[2],10),
- left : parseInt(x[3],10)
- };
Add Comment
Please, Sign In to add comment