tizen 2.0 init
[framework/multimedia/gst-plugins-base0.10.git] / docs / libs / html / gst-plugins-base-libs-gstfloatcast.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>gstfloatcast</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Library Reference Manual">
8 <link rel="up" href="gstreamer-floatcast.html" title="FloatCast Library">
9 <link rel="prev" href="gstreamer-floatcast.html" title="FloatCast Library">
10 <link rel="next" href="gstreamer-interfaces.html" title="Interfaces Library">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gstreamer-floatcast.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="gstreamer-floatcast.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Library Reference Manual</th>
21 <td><a accesskey="n" href="gstreamer-interfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-libs-gstfloatcast.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-libs-gstfloatcast.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="gst-plugins-base-libs-gstfloatcast"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstfloatcast.top_of_page"></a>gstfloatcast</span></h2>
34 <p>gstfloatcast — Floating point platform independence macros</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="gst-plugins-base-libs-gstfloatcast.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include &lt;gst/floatcast/floatcast.h&gt;
42
43 #define             <a class="link" href="gst-plugins-base-libs-gstfloatcast.html#gst-cast-double" title="gst_cast_double()">gst_cast_double</a>                     (x)
44 #define             <a class="link" href="gst-plugins-base-libs-gstfloatcast.html#gst-cast-float" title="gst_cast_float()">gst_cast_float</a>                      (x)
45 </pre>
46 </div>
47 <div class="refsect1">
48 <a name="gst-plugins-base-libs-gstfloatcast.description"></a><h2>Description</h2>
49 <p>
50 The floatcast.h header file contains a couple of convenience macros for
51 floating point numbers.
52 </p>
53 <p>
54 If you include this header, your application or library must link against
55 libm (for maths.h support).
56 </p>
57 <p>
58 For optimal results, your application's or library's build
59 system should check whether the C99 functions lrint and lrintf are supported
60 and define the preprocessor symbols HAVE_LRINT and HAVE_LRINTF if so.  If
61 you are using autoconf, you can do this by using the AC_C99_FUNC_LRINT and
62 AC_C99_FUNC_LRINTF checks in your configure.ac or configure.in file and
63 including your application's config.h header before you include floatcast.h.
64 </p>
65 </div>
66 <div class="refsect1">
67 <a name="gst-plugins-base-libs-gstfloatcast.details"></a><h2>Details</h2>
68 <div class="refsect2">
69 <a name="gst-cast-double"></a><h3>gst_cast_double()</h3>
70 <pre class="programlisting">        #define gst_cast_double(x)      ((gint)lrint(x))
71 </pre>
72 <p>
73 Casts a 64-bit floating point value (double) to an integer without bias.
74 </p>
75 <div class="variablelist"><table border="0">
76 <col align="left" valign="top">
77 <tbody><tr>
78 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
79 <td>input value</td>
80 </tr></tbody>
81 </table></div>
82 </div>
83 <hr>
84 <div class="refsect2">
85 <a name="gst-cast-float"></a><h3>gst_cast_float()</h3>
86 <pre class="programlisting">        #define gst_cast_float(x)       ((gint)lrintf(x))
87 </pre>
88 <p>
89 Casts a 32-bit floating point value (float) to an integer without bias.
90 </p>
91 <div class="variablelist"><table border="0">
92 <col align="left" valign="top">
93 <tbody><tr>
94 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
95 <td>input value</td>
96 </tr></tbody>
97 </table></div>
98 </div>
99 </div>
100 </div>
101 <div class="footer">
102 <hr>
103           Generated by GTK-Doc V1.18</div>
104 </body>
105 </html>