Re: Round a number towards zero!
Re: Round a number towards zero!
- Subject: Re: Round a number towards zero!
- From: Graff <email@hidden>
- Date: Fri, 18 Mar 2005 08:52:41 -0500
It's under Standard Additions->Miscellaneous Commands
round: Round number to integer
round real -- the number to round
[rounding up/down/toward zero/to nearest/as taught in school] --
the rounding direction; if omitted, rounds to nearest. “to nearest”
rounds .5 cases to the nearest even integer in order to decrease
cumulative errors. To always round .5 away from zero, use “as taught
in school.”
Result: integer -- the rounded value
So for example:
----
set x to 10.2
set y to round x rounding toward zero
----
- Ken
On Mar 18, 2005, at 8:32 AM, Marcus Rodrigues wrote:
Hi people, I need some help!
How do I tell an script to round some number towards zero?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden