summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qminmax.qdoc
blob: 36f680b4c7b80268c01e907d7176443cdfb9b71f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*! \fn template <typename T> const T &qMin(const T &a, const T &b)
    \relates <QtMinMax>

    Returns the minimum of \a a and \a b.

    Example:

    \snippet code/src_corelib_global_qglobal.cpp 13

    \sa qMax(), qBound()
*/

/*! \fn template <typename T> const T &qMax(const T &a, const T &b)
    \relates <QtMinMax>

    Returns the maximum of \a a and \a b.

    Example:

    \snippet code/src_corelib_global_qglobal.cpp 14

    \sa qMin(), qBound()
*/

/*! \fn template <typename T> const T &qBound(const T &min, const T &val, const T &max)
    \relates <QtMinMax>

    Returns \a val bounded by \a min and \a max. This is equivalent
    to qMax(\a min, qMin(\a val, \a max)).

    Example:

    \snippet code/src_corelib_global_qglobal.cpp 15

    \sa qMin(), qMax()
*/