Skip to content
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

Question regarding largestRect.coffee #643

Open
ss32 opened this issue May 15, 2018 · 0 comments
Open

Question regarding largestRect.coffee #643

ss32 opened this issue May 15, 2018 · 0 comments

Comments

@ss32
Copy link

ss32 commented May 15, 2018

If maxArea, minWidth, maxHeight, and maxWidth are all initialized as 0, how does the algorithm ever fall into this while loop?

while (right - left) >= widthStep

A few lines above, left and right are defined as

left = Math.max options.minWidth, Math.sqrt(maxArea*aRatio)
right = Math.min maxWidth, maxHeight*aRatio

but that returns 0 for both, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant