Re: simple number question
Re: simple number question
- Subject: Re: simple number question
- From: Kai Edwards <email@hidden>
- Date: Tue, 24 Dec 2002 10:47:17 +0000
on Mon, 23 Dec 2002 20:20:44 -0600, Peter Kincaid <email@hidden>
wrote:
>
how do I get a equation to return a number rounded to the nearest tenth
>
rather than a whole slew of numbers
>
>
ex 10 / 3 = 3.33 instead of
>
>
10 / 3 = 3.33333333333
You might also try something like this, Peter:
=======================
10 * 100 div 3 / 100
=======================
... or, for a general purpose handler:
=======================
divNum of 10 by 3 for 2
to divNum of n by d for p
tell 10 ^ p to n * it div d / it
end divNum
=======================
OMM, it's about 30-50 faster than alternative methods.
--
Kai
_______________________________________________
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.