| 1 | <?xml version="1.0" encoding="UTF-8"?>\r |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r |
| 3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r |
| 4 | <refentry id="max">\r |
| 5 | <refmeta>\r |
| 6 | <refmetainfo>\r |
| 7 | <copyright>\r |
| 8 | <year>2011</year>\r |
| 9 | <holder>Khronos Group</holder>\r |
| 10 | </copyright>\r |
| 11 | </refmetainfo>\r |
| 12 | <refentrytitle>max</refentrytitle>\r |
| 13 | <manvolnum>3G</manvolnum>\r |
| 14 | </refmeta>\r |
| 15 | <refnamediv>\r |
| 16 | <refname>max</refname>\r |
| 17 | <refpurpose>return the greater of two values</refpurpose>\r |
| 18 | </refnamediv>\r |
| 19 | <refsynopsisdiv><title>Declaration</title>\r |
| 20 | <funcsynopsis>\r |
| 21 | <funcprototype>\r |
| 22 | <funcdef>genType <function>max</function></funcdef>\r |
| 23 | <paramdef>genType <parameter>x</parameter></paramdef>\r |
| 24 | <paramdef>genType <parameter>y</parameter></paramdef>\r |
| 25 | </funcprototype>\r |
| 26 | </funcsynopsis>\r |
| 27 | <funcsynopsis>\r |
| 28 | <funcprototype>\r |
| 29 | <funcdef>genType <function>max</function></funcdef>\r |
| 30 | <paramdef>genType <parameter>x</parameter></paramdef>\r |
| 31 | <paramdef>float <parameter>y</parameter></paramdef>\r |
| 32 | </funcprototype>\r |
| 33 | </funcsynopsis>\r |
| 34 | <funcsynopsis>\r |
| 35 | <funcprototype>\r |
| 36 | <funcdef>genDType <function>max</function></funcdef>\r |
| 37 | <paramdef>genDType <parameter>x</parameter></paramdef>\r |
| 38 | <paramdef>genDType <parameter>y</parameter></paramdef>\r |
| 39 | </funcprototype>\r |
| 40 | </funcsynopsis>\r |
| 41 | <funcsynopsis>\r |
| 42 | <funcprototype>\r |
| 43 | <funcdef>genDType <function>max</function></funcdef>\r |
| 44 | <paramdef>genDType <parameter>x</parameter></paramdef>\r |
| 45 | <paramdef>double <parameter>y</parameter></paramdef>\r |
| 46 | </funcprototype>\r |
| 47 | </funcsynopsis>\r |
| 48 | <funcsynopsis>\r |
| 49 | <funcprototype>\r |
| 50 | <funcdef>genIType <function>max</function></funcdef>\r |
| 51 | <paramdef>genIType <parameter>x</parameter></paramdef>\r |
| 52 | <paramdef>genIType <parameter>y</parameter></paramdef>\r |
| 53 | </funcprototype>\r |
| 54 | </funcsynopsis>\r |
| 55 | <funcsynopsis>\r |
| 56 | <funcprototype>\r |
| 57 | <funcdef>genIType <function>max</function></funcdef>\r |
| 58 | <paramdef>genIType <parameter>x</parameter></paramdef>\r |
| 59 | <paramdef>int <parameter>y</parameter></paramdef>\r |
| 60 | </funcprototype>\r |
| 61 | </funcsynopsis>\r |
| 62 | <funcsynopsis>\r |
| 63 | <funcprototype>\r |
| 64 | <funcdef>genUType <function>max</function></funcdef>\r |
| 65 | <paramdef>genUType <parameter>x</parameter></paramdef>\r |
| 66 | <paramdef>genUType <parameter>y</parameter></paramdef>\r |
| 67 | </funcprototype>\r |
| 68 | </funcsynopsis>\r |
| 69 | <funcsynopsis>\r |
| 70 | <funcprototype>\r |
| 71 | <funcdef>genUType <function>max</function></funcdef>\r |
| 72 | <paramdef>genUType <parameter>x</parameter></paramdef>\r |
| 73 | <paramdef>uint <parameter>y</parameter></paramdef>\r |
| 74 | </funcprototype>\r |
| 75 | </funcsynopsis>\r |
| 76 | </refsynopsisdiv>\r |
| 77 | <refsect1 id="parameters"><title>Parameters</title>\r |
| 78 | <variablelist>\r |
| 79 | <varlistentry>\r |
| 80 | <term><parameter>x</parameter></term>\r |
| 81 | <listitem>\r |
| 82 | <para>\r |
| 83 | Specify the first value to compare.\r |
| 84 | </para>\r |
| 85 | </listitem>\r |
| 86 | </varlistentry>\r |
| 87 | <varlistentry>\r |
| 88 | <term><parameter>y</parameter></term>\r |
| 89 | <listitem>\r |
| 90 | <para>\r |
| 91 | Specify the second value to compare.\r |
| 92 | </para>\r |
| 93 | </listitem>\r |
| 94 | </varlistentry>\r |
| 95 | </variablelist>\r |
| 96 | </refsect1>\r |
| 97 | <refsect1 id="description"><title>Description</title>\r |
| 98 | <para>\r |
| 99 | <function>max</function> returns the maximum of the two parameters. It\r |
| 100 | returns <parameter>y</parameter> if <parameter>y</parameter> is greater than\r |
| 101 | <parameter>x</parameter>, otherwise it returns <parameter>x</parameter>.\r |
| 102 | </para>\r |
| 103 | </refsect1>\r |
| 104 | <refsect1 id="versions"><title>Version Support</title>\r |
| 105 | <informaltable frame="topbot">\r |
| 106 | #VARTABLECOLS#\r |
| 107 | <thead>\r |
| 108 | #FUNCTABLEHEADER#\r |
| 109 | <row>\r |
| 110 | <entry>max (genType)</entry>#newin11#\r |
| 111 | </row>\r |
| 112 | <row>\r |
| 113 | <entry>max (genIType)</entry>#newin13#\r |
| 114 | </row>\r |
| 115 | <row>\r |
| 116 | <entry>max (genUType)</entry>#newin13#\r |
| 117 | </row>\r |
| 118 | <row>\r |
| 119 | <entry>max (genDType)</entry>#newin40#\r |
| 120 | </row>\r |
| 121 | </thead>\r |
| 122 | </tgroup>\r |
| 123 | </informaltable>\r |
| 124 | </refsect1>\r |
| 125 | <refsect1 id="seealso"><title>See Also</title>\r |
| 126 | <para>\r |
| 127 | <citerefentry><refentrytitle>min</refentrytitle></citerefentry>,\r |
| 128 | <citerefentry><refentrytitle>abs</refentrytitle></citerefentry>\r |
| 129 | </para>\r |
| 130 | </refsect1>\r |
| 131 | <refsect1 id="Copyright"><title>Copyright</title>\r |
| 132 | <para>\r |
| 133 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r |
| 134 | This material may be distributed subject to the terms and conditions set forth in \r |
| 135 | the Open Publication License, v 1.0, 8 June 1999.\r |
| 136 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r |
| 137 | </para>\r |
| 138 | </refsect1>\r |
| 139 | </refentry>\r |