Userland: Move non-standard math constants from math.h

This commit is contained in:
Jean-Baptiste Boric 2021-04-25 21:10:55 +02:00 committed by Linus Groh
parent 9aa44fa36c
commit 7d84f09e7e
Notes: sideshowbarker 2024-07-18 19:01:08 +09:00
5 changed files with 14 additions and 4 deletions

11
AK/ExtraMathConstants.h Normal file
View file

@ -0,0 +1,11 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#define M_TAU 6.28318530717958647692
#define M_DEG2RAD 0.01745329251994329576
#define M_RAD2DEG 57.2957795130823208767

View file

@ -5,6 +5,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/ExtraMathConstants.h>
#include <AK/Platform.h>
#include <AK/StdLibExtras.h>
#include <LibC/assert.h>

View file

@ -57,10 +57,6 @@ __BEGIN_DECLS
#define M_SQRT2f32 1.41421356237309504880f
#define M_SQRT1_2f32 0.70710678118654752440f
#define M_TAU 6.28318530717958647692
#define M_DEG2RAD 0.01745329251994329576
#define M_RAD2DEG 57.2957795130823208767
#define FP_NAN 0
#define FP_INFINITE 1
#define FP_ZERO 2

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/ExtraMathConstants.h>
#include <AK/OwnPtr.h>
#include <LibGfx/Painter.h>
#include <LibWeb/Bindings/CanvasRenderingContext2DWrapper.h>

View file

@ -5,6 +5,7 @@
*/
#include <AK/Debug.h>
#include <AK/ExtraMathConstants.h>
#include <AK/StringBuilder.h>
#include <LibGfx/Painter.h>
#include <LibGfx/Path.h>