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

Use const to represent size of square #131

Open
johnthagen opened this issue Sep 5, 2016 · 0 comments
Open

Use const to represent size of square #131

johnthagen opened this issue Sep 5, 2016 · 0 comments

Comments

@johnthagen
Copy link
Contributor

johnthagen commented Sep 5, 2016

When learning the .trans Context method, I think it would be easier for new people if

let square = rectangle::square(0.0, 0.0, 50.0);

Used a const (like SQUARE_SIZE) to represent for 50.0, and then later

.trans(-25.0, -25.0);

Used something like 1.0 * SQUARE_SIZE / 2.0 so it's clear there is a relationship between those two numbers.

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