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

Area of a circle is pi*r^2 #10

Open
anzelpwj opened this issue Nov 28, 2019 · 2 comments
Open

Area of a circle is pi*r^2 #10

anzelpwj opened this issue Nov 28, 2019 · 2 comments

Comments

@anzelpwj
Copy link

I realize the exercise is more with the practice of coding than any actual computational geometry, but thought I might as well point this out. In Shape_Inheritance.scala and Shape_TypeClass.scala, you're using the circumference formula for a circle, not the area formula (Pi * radius * radius).

Just a heads up.

@BruceEckel
Copy link
Member

No, cake are square! Pie are round. (An engineering joke told by an engineer in my first "real" job out of college).

Thanks for pointing it out. I've been immersed in Atomic Kotlin so it might be awhile before I get to this.

@anzelpwj
Copy link
Author

anzelpwj commented Nov 30, 2019

As a "devout" tau-ist I'd say ideally we'd use the true circle constant. ;)

No worries on addressing this sooner rather than later. Enjoyed the book!

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

2 participants