u02/tests: Add link to desmos for circle

filtered
Simon Bruder 2023-05-07 14:02:45 +02:00
parent e942c62ad6
commit 11da9a4d79
1 changed files with 3 additions and 0 deletions

View File

@ -330,6 +330,9 @@ TEST_CASE("Bresenham circle (prop: √(x²+y²)-r<ε)") {
//
// When the points are rounded to the nearest integer,
// M must be rounded down and m rounded down.
//
// An interactive version of this can be found here:
// https://www.desmos.com/calculator/kn19qhue20
const int size = 100; // s
const int max_c = std::floor(size / (3 - std::sqrt(2))); // M (2)
const int min_c = std::ceil(((4 - std::sqrt(2)) / 7) * size); // m (3)