I was just wondering, in object orientend programming, how would you assaign a direction for an object.
Lets say I have an object in position (100, 350) and but I wont it to move to point ( 600, 39)
How would I give the object a direction it could move towards? would you use pythagoras theorem
Re: oop, directions
The direction isn't given by Pythgoras' theorem, rather use the definition of tan(x). The Math class has a couple of inverse tan methods that are useful.
I'm not sure this has anything to do with object oriented programming.