An open API service indexing awesome lists of open source software.

https://github.com/xorz57/piapproximation

Pi Approximation written in C++17
https://github.com/xorz57/piapproximation

cpp cpp17 monte-carlo-integration monte-carlo-simulation pi-approximation sfml

Last synced: over 1 year ago
JSON representation

Pi Approximation written in C++17

Awesome Lists containing this project

README

          

# PiApproximation

[![Build](https://github.com/xorz57/PiApproximation/actions/workflows/Build.yml/badge.svg)](https://github.com/xorz57/PiApproximation/actions/workflows/Build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xorz57_PiApproximation&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=xorz57_PiApproximation)

![image](https://github.com/xorz57/PiApproximation/assets/84932056/0a0b4ae1-d18d-4712-9ece-aceee672f501)

## Dependencies

- [SFML](https://github.com/SFML/SFML)
- [ImGui-SFML](https://github.com/SFML/imgui-sfml)

## How to Build

#### Linux & macOS

```bash
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
~/vcpkg/bootstrap-vcpkg.sh

git clone https://github.com/xorz57/PiApproximation.git
cd PiApproximation
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
ctest --build-config Release
```

#### Windows

```powershell
git clone https://github.com/microsoft/vcpkg.git C:/vcpkg
C:/vcpkg/bootstrap-vcpkg.bat
C:/vcpkg/vcpkg.exe integrate install

git clone https://github.com/xorz57/PiApproximation.git
cd PiApproximation
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
ctest --build-config Release
```