Sector Area - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Java Programming (https://www.supportforums.net/forumdisplay.php?fid=22) +---- Thread: Sector Area (/showthread.php?tid=24911) Pages:
1
2
|
Sector Area - RDCA - 02-01-2012 Lately I have decided that I would get back into the swing of things with Java. So as a first small project I made this. Nothing fancy, just something to get me going again. Code: import java.util.Scanner; RE: Sector Area - AceInfinity - 02-01-2012 By reading this though: Title Wrote:Sector Area And this: Thread Description Wrote:Lately I have decided that I would get back into the swing of things with Java. So as a first small project I made this. Nothing fancy, just something to get me going again. It doesn't tell people a whole lot about what it is supposed to do unless they take time to read through the code to get a general understanding From the looks of it though it measures the area of a certain section of a circle from a tangent? RE: Sector Area - RDCA - 02-01-2012 (02-01-2012, 03:55 PM)AceInfinity Wrote: By reading this though: Ow I guess I could have included info, but I assume most people know it lol. It is finding the area of the "pie slice" shape within the circle. You can also modify my code around, to do it if you are missing some of the other elements in the formula. RE: Sector Area - AceInfinity - 02-01-2012 I don't program in Java, but it's still easy to read code in general lol. I assumed as much there, but instead of 3.14 surely there's a more accurate calculation of that number which can be used? RE: Sector Area - Sam - 02-01-2012 (02-01-2012, 05:16 PM)AceInfinity Wrote: I don't program in Java, but it's still easy to read code in general lol. I assumed as much there, but instead of 3.14 surely there's a more accurate calculation of that number which can be used? Pi is an irrational number and a constant which means it will never stop. The most that has been worked out is 3.1415.. and a few hundred thousand more numbers. http://oeis.org/A000796 RE: Sector Area - AceInfinity - 02-01-2012 (02-01-2012, 05:20 PM)Sam Wrote: Pi is an irrational number and a constant which means it will never stop. The most that has been worked out is 3.1415.. and a few hundred thousand more numbers. I know what it is, I was saying though that there are better ways to use it than to round to ONLY 2 decimal places though. And some languages also include PI as a function which uses a high decimal place I believe. RE: Sector Area - RDCA - 02-01-2012 I mean you could expand out a bit more (pi), to get a more precise answer, but for school and what not they ask us to round the the first decimal place. RE: Sector Area - Denny Crane - 02-04-2012 Whats it do before i go running it! RE: Sector Area - AceInfinity - 02-04-2012 (02-04-2012, 10:35 PM)Denny Crane Wrote: Whats it do before i go running it! Read through the posts and you'll see RE: Sector Area - Denny Crane - 02-04-2012 Ah i see, this could have helped back in my last damn exam. sigh. |