Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakeroggenbuck/approximate-pi
This program creates a bunch of points in a square, then draws a circle with the same radius. Then it checks which points are inside the circle. The ratio of inside to out should be around pi/4, therefor multiplying that by 4 should result in an approximation of pi.
https://github.com/jakeroggenbuck/approximate-pi
c math pi
Last synced: 5 days ago
JSON representation
This program creates a bunch of points in a square, then draws a circle with the same radius. Then it checks which points are inside the circle. The ratio of inside to out should be around pi/4, therefor multiplying that by 4 should result in an approximation of pi.
- Host: GitHub
- URL: https://github.com/jakeroggenbuck/approximate-pi
- Owner: JakeRoggenbuck
- Created: 2022-04-17T16:33:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T06:09:54.000Z (over 1 year ago)
- Last Synced: 2023-07-11T07:25:19.179Z (over 1 year ago)
- Topics: c, math, pi
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0