summaryrefslogtreecommitdiff
path: root/AK/Complex.h
AgeCommit message (Collapse)Author
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-11-26AK: Make it possible to not `using` AK classes into the global namespaceAndreas Kling
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by default, but can be overridden by build flags. This is a step towards integrating Jakt and AK types.
2022-11-06Everywhere: Remove redundant inequality comparison operatorsDaniel Bertalan
C++20 can automatically synthesize `operator!=` from `operator==`, so there is no point in writing such functions by hand if all they do is call through to `operator==`. This fixes a compile error with compilers that implement P2468 (Clang 16 currently). This paper restores the C++17 behavior that if both `T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators makes the rewriting possible again. See https://reviews.llvm.org/D134529#3853062
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-15AK+Everywhere: Add sincos and use it in some placesHendiadyoin1
Calculating sin and cos at once is quite a bit cheaper than calculating them individually. x87 has even a dedicated instruction for it: `fsincos`.
2021-07-19Everywhere: Use AK/Math.h if applicableHendiadyoin1
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-18AK/Hex: Cleanup implementationLenny Maiorani
Problem: - Post-increment of loop index. - `const` variables are not marked `const`. - Incorrect type for loop index. Solution: - Pre-increment loop index. - Mark all possible variables `const`. - Corret type for loop index.
2021-04-18AK/Complex: C++20-compatible comparison operatorsLenny Maiorani
Problem: - Clang correctly reports non-`const` member function comparison operators as ambiguous. Solution: - Make them `const`.
2021-03-27AK: Add complex number libraryCesar Torres
Useful for diverse algorithms. Also added some tests for it.