Float.maxFloat
Float.ceil
Float.floor
Float.int
Float.round
FUNCTION: Float.minFloat
Float.minFloat
(value)
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.
Code for MinFloatExample.wml
<?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>
Code for MinFloatExample.wmls
extern function findminfloat()
{
var maxresult = Float.maxFloat();
WMLBrowser.setVar("max", maxresult);
var minresult =
Float.minFloat()
;
WMLBrowser.setVar("min", minresult);
WMLBrowser.go("MinFloatExample.wml#card2");
};
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information