Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
356 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:08 CET 2013 -->
6
<TITLE>
7
NumberUtils (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2013-01-27">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="NumberUtils (libgdx API)";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/NumberUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/LongMap.Values.html" title="class in com.badlogic.gdx.utils"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/ObjectIntMap.html" title="class in com.badlogic.gdx.utils"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../../index.html?com/badlogic/gdx/utils/NumberUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="NumberUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx.utils</FONT>
107
<BR>
108
Class NumberUtils</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.utils.NumberUtils</B>
112
</PRE>
113
<HR>
114
<DL>
115
<DT><PRE>public class <B>NumberUtils</B><DT>extends java.lang.Object</DL>
116
</PRE>
117
 
118
<P>
119
<HR>
120
 
121
<P>
122
 
123
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
124
 
125
<A NAME="constructor_summary"><!-- --></A>
126
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
127
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
128
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
129
<B>Constructor Summary</B></FONT></TH>
130
</TR>
131
<TR BGCOLOR="white" CLASS="TableRowColor">
132
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#NumberUtils()">NumberUtils</A></B>()</CODE>
133
 
134
<BR>
135
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
136
</TR>
137
</TABLE>
138
&nbsp;
139
<!-- ========== METHOD SUMMARY =========== -->
140
 
141
<A NAME="method_summary"><!-- --></A>
142
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
143
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
144
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
145
<B>Method Summary</B></FONT></TH>
146
</TR>
147
<TR BGCOLOR="white" CLASS="TableRowColor">
148
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149
<CODE>static&nbsp;long</CODE></FONT></TD>
150
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#doubleToLongBits(double)">doubleToLongBits</A></B>(double&nbsp;value)</CODE>
151
 
152
<BR>
153
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
154
</TR>
155
<TR BGCOLOR="white" CLASS="TableRowColor">
156
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157
<CODE>static&nbsp;int</CODE></FONT></TD>
158
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#floatToIntBits(float)">floatToIntBits</A></B>(float&nbsp;value)</CODE>
159
 
160
<BR>
161
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
162
</TR>
163
<TR BGCOLOR="white" CLASS="TableRowColor">
164
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165
<CODE>static&nbsp;int</CODE></FONT></TD>
166
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#floatToIntColor(float)">floatToIntColor</A></B>(float&nbsp;value)</CODE>
167
 
168
<BR>
169
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
170
</TR>
171
<TR BGCOLOR="white" CLASS="TableRowColor">
172
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173
<CODE>static&nbsp;int</CODE></FONT></TD>
174
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#floatToRawIntBits(float)">floatToRawIntBits</A></B>(float&nbsp;value)</CODE>
175
 
176
<BR>
177
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
178
</TR>
179
<TR BGCOLOR="white" CLASS="TableRowColor">
180
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181
<CODE>static&nbsp;float</CODE></FONT></TD>
182
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#intBitsToFloat(int)">intBitsToFloat</A></B>(int&nbsp;value)</CODE>
183
 
184
<BR>
185
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
186
</TR>
187
<TR BGCOLOR="white" CLASS="TableRowColor">
188
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189
<CODE>static&nbsp;float</CODE></FONT></TD>
190
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#intToFloatColor(int)">intToFloatColor</A></B>(int&nbsp;value)</CODE>
191
 
192
<BR>
193
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes the ABGR int color as a float.</TD>
194
</TR>
195
<TR BGCOLOR="white" CLASS="TableRowColor">
196
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197
<CODE>static&nbsp;double</CODE></FONT></TD>
198
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/NumberUtils.html#longBitsToDouble(long)">longBitsToDouble</A></B>(long&nbsp;value)</CODE>
199
 
200
<BR>
201
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
202
</TR>
203
</TABLE>
204
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
205
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
206
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
207
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
208
</TR>
209
<TR BGCOLOR="white" CLASS="TableRowColor">
210
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
211
</TR>
212
</TABLE>
213
&nbsp;
214
<P>
215
 
216
<!-- ========= CONSTRUCTOR DETAIL ======== -->
217
 
218
<A NAME="constructor_detail"><!-- --></A>
219
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
220
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
221
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
222
<B>Constructor Detail</B></FONT></TH>
223
</TR>
224
</TABLE>
225
 
226
<A NAME="NumberUtils()"><!-- --></A><H3>
227
NumberUtils</H3>
228
<PRE>
229
public <B>NumberUtils</B>()</PRE>
230
<DL>
231
</DL>
232
 
233
<!-- ============ METHOD DETAIL ========== -->
234
 
235
<A NAME="method_detail"><!-- --></A>
236
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
237
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
238
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
239
<B>Method Detail</B></FONT></TH>
240
</TR>
241
</TABLE>
242
 
243
<A NAME="floatToIntBits(float)"><!-- --></A><H3>
244
floatToIntBits</H3>
245
<PRE>
246
public static int <B>floatToIntBits</B>(float&nbsp;value)</PRE>
247
<DL>
248
<DD><DL>
249
</DL>
250
</DD>
251
</DL>
252
<HR>
253
 
254
<A NAME="floatToRawIntBits(float)"><!-- --></A><H3>
255
floatToRawIntBits</H3>
256
<PRE>
257
public static int <B>floatToRawIntBits</B>(float&nbsp;value)</PRE>
258
<DL>
259
<DD><DL>
260
</DL>
261
</DD>
262
</DL>
263
<HR>
264
 
265
<A NAME="floatToIntColor(float)"><!-- --></A><H3>
266
floatToIntColor</H3>
267
<PRE>
268
public static int <B>floatToIntColor</B>(float&nbsp;value)</PRE>
269
<DL>
270
<DD><DL>
271
</DL>
272
</DD>
273
</DL>
274
<HR>
275
 
276
<A NAME="intToFloatColor(int)"><!-- --></A><H3>
277
intToFloatColor</H3>
278
<PRE>
279
public static float <B>intToFloatColor</B>(int&nbsp;value)</PRE>
280
<DL>
281
<DD>Encodes the ABGR int color as a float. The high bits are masked to avoid using floats in the NaN range, which unfortunately
282
 means the full range of alpha cannot be used. See <CODE>Float.intBitsToFloat(int)</CODE> javadocs.
283
<P>
284
<DD><DL>
285
</DL>
286
</DD>
287
</DL>
288
<HR>
289
 
290
<A NAME="intBitsToFloat(int)"><!-- --></A><H3>
291
intBitsToFloat</H3>
292
<PRE>
293
public static float <B>intBitsToFloat</B>(int&nbsp;value)</PRE>
294
<DL>
295
<DD><DL>
296
</DL>
297
</DD>
298
</DL>
299
<HR>
300
 
301
<A NAME="doubleToLongBits(double)"><!-- --></A><H3>
302
doubleToLongBits</H3>
303
<PRE>
304
public static long <B>doubleToLongBits</B>(double&nbsp;value)</PRE>
305
<DL>
306
<DD><DL>
307
</DL>
308
</DD>
309
</DL>
310
<HR>
311
 
312
<A NAME="longBitsToDouble(long)"><!-- --></A><H3>
313
longBitsToDouble</H3>
314
<PRE>
315
public static double <B>longBitsToDouble</B>(long&nbsp;value)</PRE>
316
<DL>
317
<DD><DL>
318
</DL>
319
</DD>
320
</DL>
321
<!-- ========= END OF CLASS DATA ========= -->
322
<HR>
323
 
324
 
325
<!-- ======= START OF BOTTOM NAVBAR ====== -->
326
<A NAME="navbar_bottom"><!-- --></A>
327
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
328
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
329
<TR>
330
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
331
<A NAME="navbar_bottom_firstrow"><!-- --></A>
332
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
333
  <TR ALIGN="center" VALIGN="top">
334
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
335
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
336
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
337
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/NumberUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
338
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
339
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
340
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
341
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
342
  </TR>
343
</TABLE>
344
</TD>
345
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
346
libgdx API</EM>
347
</TD>
348
</TR>
349
 
350
<TR>
351
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
352
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/LongMap.Values.html" title="class in com.badlogic.gdx.utils"><B>PREV CLASS</B></A>&nbsp;
353
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/ObjectIntMap.html" title="class in com.badlogic.gdx.utils"><B>NEXT CLASS</B></A></FONT></TD>
354
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
355
  <A HREF="../../../../index.html?com/badlogic/gdx/utils/NumberUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
356
&nbsp;<A HREF="NumberUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
357
&nbsp;<SCRIPT type="text/javascript">
358
  <!--
359
  if(window==top) {
360
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
361
  }
362
  //-->
363
</SCRIPT>
364
<NOSCRIPT>
365
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
366
</NOSCRIPT>
367
 
368
 
369
</FONT></TD>
370
</TR>
371
<TR>
372
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
373
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
374
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
375
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
376
</TR>
377
</TABLE>
378
<A NAME="skip-navbar_bottom"></A>
379
<!-- ======== END OF BOTTOM NAVBAR ======= -->
380
 
381
<HR>
382
 
383
                                <div style="font-size:9pt"><i>
384
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
385
                                </i></div>
386
 
387
</BODY>
388
</HTML>