WMLScript » Float » Float.minFloat

Syntax:
Float.minFloat()

Returns the smallest nonzero floating-point number supported by the browser.

The Float.minFloat function returns the smallest nonzero single-precision floating-point number that is supported by the browser.

The companion Float.maxFloat function returns the maximum single-precision floating-point number that is supported by the browser.

If the browser does not support floating-point arithmetic operations, then the browser will not recognize the Float Library, nor any of the member functions. In this case, the Float.minFloat function returns invalid.

This function does not take a parameter.

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

<card id="card1">
   <p>
   minFloat example
   </p>
   <do type="accept">
      <go href="MinFloatExample.wmls#findminfloat()" />
   </do>
</card>

<card id="card2">
<p>
   maximum = $(max)
   <br />
   minimum = $(min)
</p>
</card>

</wml>
Explanation:

Code for MinFloatExample.wml

Language(s): WML
Code:
extern function findminfloat()
{
   var maxresult = Float.maxFloat();
   WMLBrowser.setVar("max", maxresult);
   var minresult = Float.minFloat();
   WMLBrowser.setVar("min", minresult);
   WMLBrowser.go("MinFloatExample.wml#card2");
};
Explanation:

Code for MinFloatExample.wmls

Language(s): WML

See Also: