ladybird/Userland/Demos
Daniel Bertalan c6fafd3e90 AK+Userland: Add generic AK::abs() function and use it
Previously, in LibGFX's `Point` class, calculated distances were passed
to the integer `abs` function, even if the stored type was a float. This
caused the value to unexpectedly be truncated. Luckily, this API was not
used with floating point types, but that can change in the future, so
why not fix it now :^)

Since we are in C++, we can use function overloading to make things
easy, and to automatically use the right version.

This is even better than the LibC/LibM functions, as using a bit of
hackery, they are able to be constant-evaluated. They use compiler
intrinsics, so they do not depend on external code and the compiler can
emit the most optimized code by default.

Since we aren't using the C++ standard library's trick of importing
everything into the `AK` namespace, this `abs` function cannot be
exported to the global namespace, as the names would clash.
2021-07-08 10:11:00 +02:00
..
CatDog WindowServer: Make most remaining WindowServer IPC calls async 2021-07-04 23:15:16 +02:00
Cube Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Eyes AK+Userland: Add generic AK::abs() function and use it 2021-07-08 10:11:00 +02:00
Fire Fire: Make the main widget a GUI::Frame 2021-07-05 02:38:31 +02:00
LibGfxDemo Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
LibGfxScaleDemo Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Mandelbrot Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Mouse Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Screensaver Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Starfield Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
WidgetGallery Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
CMakeLists.txt 3DFileViewer: Move Demos/GLTeapot to Applications/3DFileViewer 2021-05-19 19:34:12 +01:00