Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qminmax.qdoc
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*! \fn template <typename T> const T &qMin(const T &a, const T &b)
5 \relates <QtMinMax>
6
7 Returns the minimum of \a a and \a b.
8
9 Example:
10
11 \snippet code/src_corelib_global_qglobal.cpp 13
12
13 \sa qMax(), qBound()
14*/
15
16/*! \fn template <typename T> const T &qMax(const T &a, const T &b)
17 \relates <QtMinMax>
18
19 Returns the maximum of \a a and \a b.
20
21 Example:
22
23 \snippet code/src_corelib_global_qglobal.cpp 14
24
25 \sa qMin(), qBound()
26*/
27
28/*! \fn template <typename T> const T &qBound(const T &min, const T &val, const T &max)
29 \relates <QtMinMax>
30
31 Returns \a val bounded by \a min and \a max. This is equivalent
32 to qMax(\a min, qMin(\a val, \a max)).
33
34 Example:
35
36 \snippet code/src_corelib_global_qglobal.cpp 15
37
38 \sa qMin(), qMax()
39*/