Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/68f2af2423ae56b15dd75d9bec99bbc5 to your computer and use it in GitHub Desktop.
Save trycf/68f2af2423ae56b15dd75d9bec99bbc5 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfoutput>
<cfset values = [
-2,
-1.9,
-1.8,
-1.7,
-1.6,
-1.5,
-1.4,
-1.3,
-1.2,
-1.1,
-1,
-0.9,
-0.8,
-0.7,
-0.6,
-0.5,
-0.4,
-0.3,
-0.2,
-0.1,
0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8,
0.9,
1,
1.1,
1.2,
1.3,
1.4,
1.5,
1.6,
1.7,
1.8,
1.9,
2
]>
<table border="1" cellspacing="2">
<tr>
<th>Number</th>
<th>Round</th>
<th>Int</th>
<th>Ceiling</th>
<th>Fix</th>
<th>NumberFormat</th>
</tr>
<cfloop array="#values#" index="num">
<tr>
<td>#Num#</td>
<td>#Round(Num)#</td>
<td>#Int(Num)#</td>
<td>#Ceiling(Num)#</td>
<td>#Fix(Num)#</td>
<td>#NumberFormat(Num,'0')#</td>
</tr>
</cfloop>
</table>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment