-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
this is the situation Im trying to stimulate:
https://cloud.githubusercontent.com/assets/236678/18207503/b61342e2-712b-11e6-881c-bb1970ab24bb.PNG
the data:
[
[
[
[
[0, 0],
[0, 4],
[4, 4],
[4, 0],
[0, 0]
]
]
],
[
[
[
[2, -2],
[2, 5],
[3, -2],
[3, 5],
[2, -2]
]
]
]
]
the code:
var subtract = require('gh-clipping-algorithm').subtract;
var json = require('./clippingtest.json');
console.log(JSON.stringify(subtract(json[0], json[1]),null," "));
output:
[[[[2.857142857142857,4],[2.142857142857143,4],[2,4],[0,4],[0,0],[2,0],[2.2857142857142856,0],[2.857142857142857,4]]],[[[3,4],[4,4],[4,0],[3,0],[3,4]]]]
The output is invalid..
Metadata
Metadata
Assignees
Labels
No labels