thx to all of you guys. Going to read all of that :)
N.
----- Original Message -----
From: "eka" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Saturday, January 27, 2007 8:27 AM
Subject: Re: [Flashcoders] math simple operation
hello :)
the float number are a problem in Actionscript :)
you can read this article
http://en.wikipedia.org/wiki/Floating-point_numberabout this problem.
If you want fixed this problem you can use the NumberUtil class of my
openSource framework VEGAS :
1 - the page of the project to download the AS2 : framework
http://vegas.riaforge.org/
2 - Use a Subversion(SVN) client to download the framework or download
the
zip
3 - install the classpath ol vegas in your flash IDE in the preference ->
ActionScript2 preference ... add the AS2/trunk/src directory
4 - Use the NumberUtil class, example :
import vegas.util.NumberUtil ;
var result = Number(NumberUtil.toFixed(9.3 - 9, 1)) ;
trace(result) ; // 0.3
var result = Number(NumberUtil.toFixed(100.3-100, 1)) ;
trace(result) ; // 0.3
EKA+ :)
2007/1/27, ntasky <[EMAIL PROTECTED]>:
Hi,
I'm kind of disapointed :
trace (1.3-1) // traces:0.3
but :
trace (9.3-9) // traces: 0.300000000000001
trace (100.3-100) //traces: 0.299999999999997
...
is there a way that it can traces always 0.3 has it should be normal ?
thx
N.
--
Nicolas TASKY
conseil, analyse et développement multimédia
ntasky.com - (514) 839-6426
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--------------------------------------------------------------------------------
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com