u02/tests: Add link to desmos for circle
This commit is contained in:
parent
47c8aa7069
commit
f64039dba1
|
@ -330,6 +330,9 @@ TEST_CASE("Bresenham circle (prop: √(x²+y²)-r<ε)") {
|
||||||
//
|
//
|
||||||
// When the points are rounded to the nearest integer,
|
// When the points are rounded to the nearest integer,
|
||||||
// M must be rounded down and m rounded down.
|
// 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 size = 100; // s
|
||||||
const int max_c = std::floor(size / (3 - std::sqrt(2))); // M (2)
|
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)
|
const int min_c = std::ceil(((4 - std::sqrt(2)) / 7) * size); // m (3)
|
||||||
|
|
Reference in a new issue