-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maybe there is an issue in function hasAllSeedsInside if it is not a same width rectangle #2
Comments
Not only this but I think the README example has seeds that fail this test (i.e., 300 > 256). The example led me to believe that x-min and y-min would be computed from the seeds but however (as is shown in the code pasted above) the mins seem to be assumed to be "zero". Thus the user will need to translate his data to the origin (and then do the reverse translate on the output [for a general use case]). |
Thank you, I understand now. |
I think this should not have been closed. If this check is fixed, the actual logic does the correct thing for rectangles. I’m using it successfully in my fork. So this was just a simple typo it seems. |
The readme is still wrong with the seed points that lie outside the bounds however. |
dependence:
"natninter": "^0.1.3"
function hasAllSeedsInside() { var size = this._output; return this._seeds.every(function (s) { return s.x >= 0 && s.y >= 0 && s.x < size.width && s.y < size.width; }); }
x and y are ALL compared to the size.width. But setOutputSize sets this._output.width and this._output.height.
The y should be compared to size.height instead?
The text was updated successfully, but these errors were encountered: