-
Notifications
You must be signed in to change notification settings - Fork 35
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
Possible small code errors in listings 5 and 11? #12
Comments
I don't know, unfortunately! This code was written 17 years ago and the drawings were done on a piece of software that no longer exists. I would love to apply corrections, but I'm not sure that I know how to verify them any longer; I'm open to your opinions on how best to proceed. |
Okay, I've started a typescript translation. Definitely in listing 5 either line 44 should be |
Ok, thanks for taking a look! I implemented listing 11 in C++ and only the childless nodes of my tree were at the correct y-coordinate. I hope you'll still keep the original up somewhere if your plan is to create a more modern version. |
definitely. Thanks for filing this issue! |
On this line here in listing 11, shouldn't
tree.y = depth
be at the top of thesetup
function?I was implementing this recently and, with the function written as shown, I believe that code would only set the y values for trees with no children, but it should be setting the y values for every tree, should it not? Or is there an assumption here that the y-values are already set elsewhere (since most of the real complexity comes from the x coordinates, not the y coordinates)?
Additionally, in listing 5 this
tree.offset
class variable is used but seems to be accidentally copied over from listing 4. Should that value instead betree.mod
?The text was updated successfully, but these errors were encountered: