tag:blogger.com,1999:blog-305427760261504884.post1516286181598527844..comments2014-09-27T19:51:56.890-07:00Comments on Programming Tricks: Arithmetic in AS3Kundan Singhhttp://www.blogger.com/profile/10408946176930869078noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-305427760261504884.post-64569717908716664472008-09-12T21:32:00.000-07:002008-09-12T21:32:00.000-07:00Unlike C/C++ or Java where integer division result...Unlike C/C++ or Java where integer division results in an integer, in AS3 the integer division can result in a floating point number (Number).<BR/><BR/>Secondly, an Array can be used as an Object (hash-table) hence even "a" is an Array, you can set a[1.2].<BR/><BR/>Thus, if "n" is 0x0304, then n%256 is 4 but n/256 is 3.0156 hence instead of setting a[3] it sets a[3.0156].Kundan Singhhttps://www.blogger.com/profile/10408946176930869078noreply@blogger.com