A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F9] Vector class help

Threaded View

  1. #4
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    Thanks for the advice. Exactly what I was hoping for.

    I havenow changed my implementation so that I have a NullVector base class (without first coordinates, they are assumed 0 in the calculations), which should be a bit faster when you don't need the first coordinates. Then my Vector class extends this. I plan to use vectors to describe levels (for collision), so it makes sense to have a class with two sets of coordinates. Not too sure about the name NullVector though, but I couldn't think of anything appropriate. (edit: think I'm going to go for DisplacementVector which extends PositionVector, but I'm not sure yet).

    As for calculating the angle each time something changes, well, that was a choice I had to make. Faster getting or faster setting of variables. It should be easy to change anyway.
    Last edited by Fall_X; 08-29-2007 at 08:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center