1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>length
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>length
</refname>
17 <refpurpose>calculate the length of a vector
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>float
<function>length
</function></funcdef>
23 <paramdef>genType
<parameter>x
</parameter></paramdef>
26 <funcdef>double
<function>length
</function></funcdef>
27 <paramdef>genDType
<parameter>x
</parameter></paramdef>
31 <refsect1 id=
"parameters"><title>Parameters
</title>
34 <term><parameter>x
</parameter></term>
37 Specifies a vector of which to calculate the length.
43 <refsect1 id=
"description"><title>Description
</title>
45 <function>length
</function> returns the length of the vector. i.e.,
46 <inlineequation><mml:math>
52 <mml:mi>x
</mml:mi><mml:mo stretchy='false'
>[
</mml:mo><mml:mn>0</mml:mn><mml:mo stretchy='false'
>]
</mml:mo>
59 <mml:mi>x
</mml:mi><mml:mo stretchy='false'
>[
</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy='false'
>]
</mml:mo>
64 <mml:mo lspace='
0px' form='infix'
>...
</mml:mo>
67 </mml:math></inlineequation>
70 <refsect1 id=
"versions"><title>Version Support
</title>
71 <informaltable frame=
"topbot">
76 <entry>length (genType)
</entry>#newin11#
79 <entry>length (genDType)
</entry>#newin40#
85 <refsect1 id=
"seealso"><title>See Also
</title>
87 <citerefentry><refentrytitle>distance
</refentrytitle></citerefentry>,
88 <citerefentry><refentrytitle>normalize
</refentrytitle></citerefentry>
91 <refsect1 id=
"Copyright"><title>Copyright
</title>
93 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
94 This material may be distributed subject to the terms and conditions set forth in
95 the Open Publication License, v
1.0,
8 June
1999.
96 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.