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: "Arthur J Knapp" <email@hidden>
- Date: Thu, 22 Feb 2001 12:08:44 -0500
>
Date: Thu, 22 Feb 2001 10:39:08 +0000
>
From: Nigel Smith <email@hidden>
>
Subject: Re: magic integer converter number 62? (John W Baxter)
>
NG suggested using
>
num div 1
>
I may be wrong, I'm no programmer, but isn't floor *always* rounding down? ie:
>
floor(5.5) = 5
>
floor(-5.5) = -6
Whoops, I also suggested num div 1.
>
on floor(num)
>
if num < 0 then
>
return (num div 1) - 1
>
else
>
return num div 1
>
end if
>
end floor
>
...should do the business (though someone is bound to point out a quicker
No, not quicker, but there is the osax command:
on floor(num)
return round num rounding down -- Standard Additions
end floor
--
{
Arthur J Knapp, of STELLARViSIONs ;
http://www.STELLARViSIONs.com ;
mailto:email@hidden ;
"...well the rain falls down
without my help, I'm afraid
and my lawn gets wet,
though I withheld my consent..."
}