[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mod math function in JavaScript



Hello Dan

Dan Petramala wrote:
> 
> Does JavaScript have support for the MOD function and if not how has > anyone else

If you have:
var a = 20;
var b = 6;

then
i = a%b;
gives you 2 (The Rest of the division)
and
i = Math.round(a/b);
gives you (think what....) :-))

Bye
 Olaf
_____________________________________________________________________
Olaf Walkowiak, Suedeseestr.14, D-45145 Essen, Phone:+49-201-604594
si0015@aixrs1.hrz.uni-essen.de			OlafWal@aol.com
URL:http://www.bikeconn.de/com/bikeconn/hotel/olaf
_____________________________________________________________________
Request PGP public key by E-Mail
PGP fingerprint: 55 BF 58 7A E9 DC FF 28 33 31 A6 B8 FB A1 28 A6

--------------------------------------------------------------------
This message came from the mailing list javascript. For help using the
mailing list software, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.