-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathfloatconvert.xml
More file actions
executable file
·24 lines (19 loc) · 842 Bytes
/
floatconvert.xml
File metadata and controls
executable file
·24 lines (19 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>float()</name>
<category>Data</category>
<subcategory>Conversion</subcategory>
<example>
<image></image>
<code><![CDATA[
int i = 65;
float f = float(i);
println(i + " : " + f); // Prints "65 : 65.0"
]]></code>
</example>
<description><![CDATA[
Converts an <b>int</b> or <b>String</b> to its floating point representation. An <b>int</b> is easily converted to a <b>float</b>, but the contents of a <b>String</b> must resemble a number, or <b>NaN</b> (not a number) will be returned. For example, <b>float("1234.56")</b> evaluates to <b>1234.56</b>, but <b>float("giraffe")</b> will return <b>NaN</b>.<br />
<br />
When an array of <b>int</b> or <b>String</b> values is passed in, then a floating point array of the same length is returned.
]]></description>
</root>