-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Actually finish flipping the Y axis #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a hypothesis test for round-tripping conversions?
Like convert viewport->frame->viewport (and vice versa) should produce the same-ish vector.
assert cam.position == Vector(0, 0) | ||
assert cam.translate_to_viewport(Vector(0, 0)) == Vector(400, 300) | ||
assert cam.translate_to_viewport(Vector(100, 100)) == Vector(500, 200) | ||
assert cam.translate_to_viewport(Vector(-150, -500)) == Vector(250, 800) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to parameterize these tests? It seems like we have a lot of tests that are the same basic format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that when I find a spare moment.
…t precision problems.
This looks good, rerunning the failed tests, will merge when it's done. |
@pathunstrom FYI, you can always invoke bors r=pathunstrom |
Build succeeded
|
I mean, I intentionally wanted to make sure it was working before I walked away from it. |
'k, then I misunderstood the comment (but I did check the CI log before kicking off the merge) |
Then all's good. Just explaining my thought process, no worries. |
So that easy little y-flip PR I did left a bunch of stuff broken.
Fix that.