Skip to content

Instantly share code, notes, and snippets.

View gist:a86885e8529b5ba13953c363da23f57d
#include <optional>
#include <iostream>
struct Point {
Point(float x, float y): x{x}, y{y} {
}
float x;
float y;
};
View pi.cpp
#include <algorithm>
#include <cmath>
#include <iostream>
#include <random>
#include <vector>
using point_t = std::pair<double, double>;
std::vector<point_t> generateRandomPointsInSquare(double length, size_t nbPoints) {
std::random_device random_device;