This project provides a Java application to approximate the value of Pi using Monte Carlo simulation. The approximation is calculated based on the number of randomly generated points that fall inside a unit circle divided by the total number of points.
- Approximates the value of Pi
- Displays the approximation difference compared to Java's
Math.PI
- JUnit test for validation
To get started, clone the repository to your local machine:
git clone https://github.com/YourGithubUsername/PIapproximation.git
Navigate to the src/main/java/edu/gcccd/csis directory to find the source files.
Compile and run the PIapproximation.java file. The application will prompt you to enter the number of points to use for the approximation. Here's how it works:
- Compile the code:
javac PIapproximation.java
- Run the program:
java PIapproximation
Navigate to the src/test/java/edu/gcccd/csis directory and run the PIapproximationTest.java to validate the approximation within a given margin of error.
Copyright © 2023 Rudy Orahin. Licensed under the MIT License. See LICENSE for more information.
---
Feel free to modify the content to better suit your project. Don't forget to add a `LICENSE` file in your GitHub repository and paste the MIT License text into it, stating you as the copyright holder.