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

Unclear documentation regarding box points #26

Closed
eolognt opened this issue May 9, 2015 · 3 comments
Closed

Unclear documentation regarding box points #26

eolognt opened this issue May 9, 2015 · 3 comments

Comments

@eolognt
Copy link

eolognt commented May 9, 2015

I find it unclear in the documentation how a box is constructed. It is said that the vector which is passed when constructing the box represents the bottom left corner (here), but in sat.js it says the top left corner (and here). At last I figured out that it is the top left to the local coordinate grid. It would be a good thing if you pointed that out. I know that there is a little note in the polygon section, but I didn't see that til now.

I most say though that the documentation is really nice and most of the time I don't have to look at it. The methods and properties are self explanatory.

@jriecken
Copy link
Owner

You're absolutely right! I'll fix it. Thanks for reporting these

@jriecken
Copy link
Owner

It is the bottom-left - the smallest x and smallest y value.

@HHogg
Copy link

HHogg commented Jun 14, 2018

The "bottom left" also tripped me up a little bit. Looking at the toPolygon method, it appears it's the top left of the shape? I'm pretty sure it's just the way I'm thinking about it but positioning in CSS, SVG, Canvas etc 0,0 is the top left of element/window.

To me, it would make more sense for the documentation to read as the "top left corner of the box".

Edit - Awesome, simple and focused library BTW. I use it to handle the collision detection in my SysPlot library (Demo/Github) Thanks!

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

No branches or pull requests

3 participants