From f1190edc7eb6240527d5300b079ce81f3887d2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 9 Apr 2023 10:37:22 +0200 Subject: [PATCH] Math: doc++ --- src/Magnum/Math/Functions.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Math/Functions.h b/src/Magnum/Math/Functions.h index 8f7ebd177..4afe441eb 100644 --- a/src/Magnum/Math/Functions.h +++ b/src/Magnum/Math/Functions.h @@ -101,6 +101,9 @@ Expands to `__builtin_popcount` / `__builtin_popcountll` on GCC and Clang, uses the [Counting bits set, in parallel](https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel) implementation from Sean Eron Anderson Bit Twiddling Hacks page on MSVC and elsewhere. + +See also @relativeref{Corrade,Containers::BitArrayView::count()} for a variant +optimized for running on large sequences of bits. */ /* Explicitly checking for Clang in addition to GCC to catch also clang-cl */ #if defined(CORRADE_TARGET_GCC) || defined(CORRADE_TARGET_CLANG) @@ -164,7 +167,7 @@ template inline T cos(Unit angle) { return cos(Rad(angle)); #if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) namespace Implementation { /* GCC builtin since 3.4 (https://stackoverflow.com/a/2742861), - unfortunately either Clang nor MSVC have any alternative which wouldn't + unfortunately neither Clang nor MSVC have any alternative which wouldn't involve inline assembly. */ inline void sincos(Float rad, Float& sin, Float& cos) { __builtin_sincosf(rad, &sin, &cos);