1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

AK: Make sure we don't include Math.h or math.h from KERNEL

This commit is contained in:
Andrew Kaster 2022-04-09 14:31:54 -06:00 committed by Brian Gianforcaro
parent bc7c8879c5
commit 83603d68d2
4 changed files with 19 additions and 6 deletions

View file

@ -9,10 +9,13 @@
#include <AK/Concepts.h>
#include <AK/Format.h>
#include <AK/IntegralMath.h>
#include <AK/Math.h>
#include <AK/NumericLimits.h>
#include <AK/Types.h>
#ifndef KERNEL
# include <AK/Math.h>
#endif
namespace AK {
// FIXME: this always uses round to nearest break-tie to even
@ -45,11 +48,14 @@ public:
{
}
#ifndef KERNEL
template<FloatingPoint F>
explicit ALWAYS_INLINE operator F() const
{
return (F)m_value * pow<F>(0.5, precision);
}
#endif
template<Integral I>
explicit constexpr operator I() const
{