Comments on: Advanced ActionScript Rounding Functions https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: Josh Tynjala https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-4744 Fri, 25 Feb 2011 19:13:15 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-4744 Ah yes, you’re right. toFixed() does the same thing as my roundToPrecision() function. I wasn’t aware of that one.

]]>
By: Grant Smith https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-4743 Fri, 25 Feb 2011 19:08:50 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-4743 Why not just use .toFixed() ?

]]>
By: adam https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-411 Wed, 10 Dec 2008 05:21:20 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-411 Cheers! Google found me here after a search for FLASH ACTIONSCRIPT ROUND 10 and whilst I did not need the Class entirely, the method for rounding to a nearest number was priceless. So simple if you know the math.

Brilliant. THANKS!

]]>
By: Theo Lagendijk https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-410 Mon, 19 May 2008 20:48:38 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-410 Thanks a lot for the roundToPrecision function!

]]>
By: jason https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-409 Wed, 30 Jan 2008 09:34:44 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-409 Tnx!

]]>
By: Josh Tynjala https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-408 Sat, 28 Jul 2007 09:16:53 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-408 Sorry guys, I didn’t mention that there’s some minor setup needed on your part. For one, you need to put the file into a directory com/joshtynjala/utils and usage is as Detrus describes.

]]>
By: Detrus https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-407 Sat, 28 Jul 2007 01:58:02 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-407 ok here, so if I create all these folders and call the ActionSript text file MathUtils.as

first import

import com.joshtynjala.utils.*;

then usage is

MathUtils.roundDownToNearest(3.3993, 4)

i forgot to include MathUtils. before the function names cuz i’m not into packaging OOP yet.

]]>
By: Detrus https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-406 Sat, 28 Jul 2007 01:51:10 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-406 Well I can’t figure it out, wtf was the solution

]]>
By: aaron https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-405 Thu, 19 Jul 2007 11:14:36 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-405 nevermind, figured it out.

]]>
By: aaron https://joshblog.net/2007/02/06/advanced-actionscript-rounding-functions/#comment-404 Thu, 19 Jul 2007 11:12:34 +0000 http://www.zeuslabs.us/archives/120/advanced-actionscript-rounding-functions/#comment-404 Im having some trouble using the class, even though I import the class, the Flash IDE keeps telling me the method is undefined.

]]>