Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
src_corelib_kernel_qmath.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 Laszlo Papp <lpapp@kde.org>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#
include
<
QtMath
>
5
6
void
qmath_examples
()
7
{
8
{
9
//! [0]
10
float
degrees = 180.0f;
11
float
radians = qDegreesToRadians(degrees);
12
//! [0]
13
}
14
15
{
16
//! [1]
17
double
degrees = 180.0;
18
double
radians = qDegreesToRadians(degrees);
19
//! [1]
20
}
21
22
{
23
//! [2]
24
float
radians =
float
(M_PI);
25
float
degrees = qRadiansToDegrees(radians);
26
//! [2]
27
}
28
29
{
30
//! [3]
31
double
radians = M_PI;
32
double
degrees = qRadiansToDegrees(radians);
33
//! [3]
34
}
35
}
qmath_examples
void qmath_examples()
Definition
src_corelib_kernel_qmath.cpp:6
qtbase
src
corelib
doc
snippets
code
src_corelib_kernel_qmath.cpp
Generated on
for Qt by
1.18.0