class Vector2D{
...
/**
* Combine the two vectors into this vector
* @param other amount to add to this
*/
public void add(Vector2D other) {
{
//_x += other.getX();
//_y += other.getY();
_x += other._x;
~~~~~~~~~~~~~~ _x is private, however you can still call
other._x within the Vector2D class.
}
}
...
}
Monday, December 12, 2005
Saturday, October 15, 2005
Subscribe to:
Posts (Atom)