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

Complete Lab Using Math.Abs Instead of Hardcoded Statments #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gabbymassaro
Copy link

Thanks for your help! This was a lot easier after I understood what they were asking. I don't know if Math.Abs is appropriate for most scenarios but using this seems best given the scenario:

you can't go negative blocks away.

Math.abs makes it a bit more simple to take the value of whichever direction (up or down) you're going and equate it to its absolute value - then run the rest of the math through this program's other functions.

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

Successfully merging this pull request may close these issues.

1 participant