Perceptual Color

helperposixmath.h
1// SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
2// SPDX-License-Identifier: BSD-2-Clause OR MIT
3
4#ifndef HELPERPOSIXMATH_H
5#define HELPERPOSIXMATH_H
6
7#include <qmath.h>
8
9/** @internal
10 *
11 * @file
12 *
13 * From <tt>&lt;qmath.h&gt;</tt> documentation:
14 *
15 * > The header also ensures some constants specified in POSIX, but not
16 * > present in C++ standards (so absent from <tt>&lt;math.h&gt;</tt> on some
17 * > platforms), are defined:
18 *
19 * To ensure that we never forget to include <tt>&lt;qmath.h&gt;</tt>, we
20 * define our own constexpr with these values here. When these constexpr are
21 * used, it is ensured that <em>this</em> header is included, and thus
22 * indirectly also <tt>&lt;qmath.h&gt;</tt>. Furthermore, the constexpr are
23 * much more convenient to use than the POSIX constants, which are macros. */
24
25namespace PerceptualColor
26{
27
28/** @internal
29 *
30 * @brief pi */
31constexpr auto pi = M_PI;
32
33} // namespace PerceptualColor
34
35#endif // HELPERPOSIXMATH_H
The namespace of this library.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:48:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.