1/**************************************************************************** 2** 3** Copyright (C) 2015 The Qt Company Ltd. 4** Contact: http://www.qt.io/licensing/ 5** 6** This file is part of the documentation of the Qt Toolkit. 7** 8** $QT_BEGIN_LICENSE:FDL$ 9** Commercial License Usage 10** Licensees holding valid commercial Qt licenses may use this file in 11** accordance with the commercial license agreement provided with the 12** Software or, alternatively, in accordance with the terms contained in 13** a written agreement between you and The Qt Company. For licensing terms 14** and conditions see http://www.qt.io/terms-conditions. For further 15** information use the contact form at http://www.qt.io/contact-us. 16** 17** GNU Free Documentation License Usage 18** Alternatively, this file may be used under the terms of the GNU Free 19** Documentation License version 1.3 as published by the Free Software 20** Foundation and appearing in the file included in the packaging of 21** this file. Please review the following information to ensure 22** the GNU Free Documentation License version 1.3 requirements 23** will be met: http://www.gnu.org/copyleft/fdl.html. 24** $QT_END_LICENSE$ 25** 26****************************************************************************/ 27 28/*! 29 \headerfile <QtCore/qmath.h> 30 \title Math Functions 31 \ingroup funclists 32 \brief The <QtCore/qmath.h> header provides various math functions. 33 \pagekeywords math trigonometry qmath floor ceiling absolute sine cosine tangent inverse tan exponent power natural logarithm 34*/ 35 36/*! 37 \fn int qCeil(qreal v) 38 Return the ceiling of the value \a v. 39 40 The ceiling is the smallest integer that is not less than \a v. 41 For example, if \a v is 41.2, then the ceiling is 42. 42 43 \relates <QtCore/qmath.h> 44 \sa qFloor() 45*/ 46 47/*! 48 \fn int qFloor(qreal v) 49 Return the floor of the value \a v. 50 51 The floor is the largest integer that is not greater than \a v. 52 For example, if \a v is 41.2, then the floor is 41. 53 54 \relates <QtCore/qmath.h> 55 \sa qCeil() 56*/ 57 58/*! 59 \fn qreal qFabs(qreal v) 60 Returns the absolute value of \a v as a qreal. 61*/ 62 63/*! 64 \fn qreal qSin(qreal v) 65 Returns the sine of the angle \a v in radians. 66 67 \relates <QtCore/qmath.h> 68 \sa qCos(), qTan() 69*/ 70 71/*! 72 \fn qreal qCos(qreal v) 73 Returns the cosine of an angle \a v in radians. 74 75 \relates <QtCore/qmath.h> 76 \sa qSin(), qTan() 77*/ 78 79/*! 80 \fn qreal qTan(qreal v) 81 Returns the tangent of an angle \a v in radians. 82 83 \relates <QtCore/qmath.h> 84 \sa qSin(), qCos() 85*/ 86 87/*! 88 \fn qreal qAcos(qreal v) 89 Returns the arccosine of \a v as an angle in radians. 90 Arccosine is the inverse operation of cosine. 91 92 \relates <QtCore/qmath.h> 93 \sa qAtan(), qAsin(), qCos() 94*/ 95 96/*! 97 \fn qreal qAsin(qreal v) 98 Returns the arcsine of \a v as an angle in radians. 99 Arcsine is the inverse operation of sine. 100 101 \relates <QtCore/qmath.h> 102 \sa qSin(), qAtan(), qAcos() 103*/ 104 105/*! 106 \fn qreal qAtan(qreal v) 107 Returns the arctangent of \a v as an angle in radians. 108 Arctangent is the inverse operation of tangent. 109 110 \relates <QtCore/qmath.h> 111 \sa qTan(), qAcos(), qAsin() 112*/ 113 114/*! 115 \fn qreal qAtan2(qreal y, qreal x) 116 Returns the arctangent of a point specified by the coordinates \a y and \a x. 117 This function will return the angle (argument) of that point. 118 119 \relates <QtCore/qmath.h> 120 \sa qAtan() 121*/ 122 123/*! 124 \fn qreal qSqrt(qreal v) 125 Returns the square root of \a v. 126 This function returns a NaN if \a v is a negative number. 127 128 \relates <QtCore/qmath.h> 129 \sa qPow() 130*/ 131 132/*! 133 \fn qreal qLn(qreal v) 134 Returns the natural logarithm of \a v. Natural logarithm uses base e. 135 136 \relates <QtCore/qmath.h> 137 \sa qExp() 138*/ 139 140/*! 141 \fn qreal qExp(qreal v) 142 Returns the exponential function of \c e to the power of \a v. 143 144 \relates <QtCore/qmath.h> 145 \sa qLn() 146*/ 147 148/*! 149 \fn qreal qPow(qreal x, qreal y) 150 Returns the value of \a x raised to the power of \a y. 151 That is, \a x is the base and \a y is the exponent. 152 153 \relates <QtCore/qmath.h> 154 \sa qSqrt() 155*/ 156