C++ Lets code! - Calculating Pi using ONLY random numbers

preview_player
Показать описание
It is possible to calculate Pi using c++ and random numbers. Today we will create a program that is calculating Pi.
I show how to calculate Pi based on the circle and how to generate the random numbers efficiently in c++.
Afterwards we have a look at the algorithm in action. Using Dear ImGui we show the results as a graph.

Tools that I use:

In code:
Рекомендации по теме
Комментарии
Автор

Could you also use a square grid of evenly distributed samples instead of random samples?

VideosColumbus