diff options
| author | Noobie99 <noob999noob999@gmail.com> | 2023-06-11 15:56:32 +0200 |
|---|---|---|
| committer | Noobie99 <noob999noob999@gmail.com> | 2023-06-11 15:56:32 +0200 |
| commit | 24c2d7e3b2755547f084c698c8a9a510509c0b98 (patch) | |
| tree | f7a3012ecbbd9660c581a4ef3dc832712f1f8e1f | |
| parent | b0a14e4b88db06818078f615e5b71f8f731083b6 (diff) | |
minor changes
| -rw-r--r-- | datastructures/bitset.cpp | 1 | ||||
| -rw-r--r-- | geometry/triangle.cpp | 2 | ||||
| -rw-r--r-- | template/console.cpp | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/datastructures/bitset.cpp b/datastructures/bitset.cpp index 242d821..a89746c 100644 --- a/datastructures/bitset.cpp +++ b/datastructures/bitset.cpp @@ -4,3 +4,4 @@ bits._Find_next(2); //4 bits._Find_next(4); //10 bzw. N bits[x] = 1; //not bits.set(x) or bits.reset(x)! bits[x].flip(); //not bits.flip(x)! +bits.count() //number of set bits diff --git a/geometry/triangle.cpp b/geometry/triangle.cpp index aeffa46..33a8394 100644 --- a/geometry/triangle.cpp +++ b/geometry/triangle.cpp @@ -21,7 +21,7 @@ pt inCenter(pt a, pt b, pt c) { // Zentrum des Kreises durch alle Eckpunkte // a, b und c nicht kollinear pt circumCenter(pt a, pt b, pt c) { - b = b - a, c = c - a; + b -= a, c -= a; pt d = b * norm(c) - c * norm(b); d = {-d.imag(), d.real()}; return a + d / cross(b, c) / 2.0; diff --git a/template/console.cpp b/template/console.cpp index fe5c489..31885e9 100644 --- a/template/console.cpp +++ b/template/console.cpp @@ -1,2 +1,2 @@ alias comp="g++ -std=gnu++17 -O2 -Wall -Wextra -Wconversion -Wshadow" -alias dbg="comp -g -fsanitize=address -fsanitize=undefined" +alias dbg="comp -g -fsanitize=address,undefined" |
