ACF $AcfVersion:0$
imath.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QtGlobal>
7#if QT_VERSION < 0x050000
8#include <limits>
9#define qInf std::numeric_limits<double>::infinity
10inline bool qIsNaN(double x){ return x != x; }
11#endif
12
13// ACF includes
14#include <iser/iser.h>
15
19static const double I_PI = 3.14159265358979323846;
20
24static const double I_2PI = 6.2831853071795864769;
25
26
36namespace imath
37{
38
39
40inline double GetRadianFromDegree(double degree)
41{
42 return degree / 180.0 * I_PI;
43}
44
45
46inline double GetDegreeFromRadian(double radian)
47{
48 return radian * 180.0 / I_PI;
49}
50
51
52} // namespace imath
53
54
static const double I_PI
Mathematical constant value PI.
Definition imath.h:19
static const double I_2PI
Mathematical constant value 2 * PI.
Definition imath.h:24
bool qIsNaN(double x)
Definition imath.h:10
Package with mathematical functions and algebraical primitives.
double GetDegreeFromRadian(double radian)
Definition imath.h:46
double GetRadianFromDegree(double degree)
Definition imath.h:40