Computer Science Canada

2D Vector Class

Author:  Catalyst [ Thu May 08, 2003 10:33 pm ]
Post subject:  2D Vector Class

pretty basic but good for 2d movement

Author:  Homer_simpson [ Thu May 08, 2003 10:56 pm ]
Post subject: 

it looks like a good class , but i've got a few problems... :
First of all i dunno what a vector is?
then i dunno what the function normalize and setangle do?

HELP!!!

Author:  Catalyst [ Thu May 08, 2003 11:04 pm ]
Post subject: 

a vector can be thought of in this case as an objects x and y speeds and thus its direction

seting the angle change the speed so that the object would go in the direction of the angle

normalizing reduce the vector down to a size of 1 (still move in the same direction. except slower

Author:  Homer_simpson [ Thu May 08, 2003 11:06 pm ]
Post subject: 

aaaaaaah... i c
i've done that in a different method i used boards friction to reduce the speed of ball but i still think yer method is better =/

Author:  Homer_simpson [ Thu May 08, 2003 11:11 pm ]
Post subject: 

ok now i understand but which one of the procedures in the class actually moves the vector?

Author:  Catalyst [ Fri May 09, 2003 6:14 am ]
Post subject: 

you dont move the vector, its used to move another object

Author:  Homer_simpson [ Fri May 09, 2003 11:55 am ]
Post subject: 

oh ic now i know what it exactly is ...

Author:  nate [ Fri May 09, 2003 4:34 pm ]
Post subject:  ????

What are you sapposed to do with the code u posted. I am not really fimiliar with class. Is there some code 2 input to make the file do something?

-Nate

Author:  Tony [ Fri May 09, 2003 4:39 pm ]
Post subject: 

i think there's a tutorial around here on how to use classes... its that thing where you go ClassName -> procedure


: