Re: magic integer converter number 62? (John W Baxter)
Re: magic integer converter number 62? (John W Baxter)
- Subject: Re: magic integer converter number 62? (John W Baxter)
- From: Nigel Garvey <email@hidden>
- Date: Tue, 20 Feb 2001 14:59:27 +0000
=?iso-8859-1?q?M=20Shaw?= wrote on Tue, 20 Feb 2001 00:54:11 -0800 (PST):
>
Well the fact is it does work as long as the number is greater than or
>
equal to 62, or at least it gives that impression to me!! I use it to
>
convert real numbers into integers see below. Is there a "proper" way
>
to do it that doesn't offend the rules of binary number arithmetic? I'm
>
a designer so excuse my amateur coding :-)
>
>
on floor(num)
>
return (((100 + (num - (num mod 1))) - 100) as integer)
>
end int
num div 1
NG