0 Replies Latest reply on Apr 30, 2007 7:55 AM by Rothrock

    Vector Class

    Rothrock Level 5
      I want to to some vector maths. I'm trying to figure out the best way to make my own class for it. My first thought is just to extend Array? But then I think, well they have some things in common, but I doubt I will need to sortOn() a Vector, or splice(). So then I think maybe composition is a better way to go.

      And then I've also got the problem that if you have an array of length 5 and you do this:


      Flash has no problem assigning a value to element 100!

      I was thinking of first doing this in AS2, because I know that better and probably eventually migrating it too AS3. Some of these vectors will be pretty large (65536 elements long) so I do need to try and keep this fast.

      Any advice or pointers would be great.