diff options
| -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" |
