Rounding numbers in Applescript
Rounding numbers in Applescript
- Subject: Rounding numbers in Applescript
- From: PiercyWorld <email@hidden>
- Date: Thu, 8 Jul 2004 12:52:16 -0700
Hi, I was wondering what the code would be to get a number to round to
10.25 when the number is 10.2499999999999
I am having image Events get the height and width of a file but it
sometimes returns a long number. All I wan is the first 2 before the
decimal and the second 2 after the decimal.
Here is what I have so far.
set image_height to round (image_height / image_DPI) rounding up as text
this will only return the first 2 numbers. So, the above number gets
returned as 10 instead of 10.25.
Thanks in advance!!!
Vic Piercy
_______________________________________________
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.