Re: Floor & Ceiling (no walls yet)
Re: Floor & Ceiling (no walls yet)
- Subject: Re: Floor & Ceiling (no walls yet)
- From: Deivy Petrescu <email@hidden>
- Date: Tue, 3 Feb 2004 10:05:55 -0500
At 5:10 PM -0600 2/2/04, ehsan saffari wrote:
Hi
Here is my attempt at defining Floor & Ceiling functions in AppleScript:
Anything wrong there? Can they be improved?
----Get Ceiling of a number----
on getceil(x)
if x > 0 then
set y to (x div 1) + 1
else if x < 0 then
set y to (x div 1)
end if
return y
end getceil
----
Ehsan
here is my ceiling
on teto(x)
set xd to (x div 1)
if xd < x then return xd + 1
return xd
end teto
--
Regards
Saudagues
Deivy
http://www.dicas.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.