Package | Description |
---|---|
lab1package2 |
Modifier and Type | Method and Description |
---|---|
Vector2 |
Vector2.add(Vector2 other)
Add a vector to this vector changing the components of this vector.
|
static Vector2 |
Vector2.add(Vector2 a,
Vector2 b)
Returns a new
Vector2D equal to a + b . |
static Vector2 |
Vector2.dirVector(double theta)
Returns the vector having magnitude one pointing in the direction
theta degrees from the x axis. |
Vector2 |
Vector2.multiply(double s)
Multiply this vector by a scalar amount changing the components of this
vector.
|
static Vector2 |
Vector2.multiply(double s,
Vector2 a)
Returns a new
Vector2D equal to s * a . |
Vector2 |
Vector2.subtract(Vector2 other)
Subtract a vector from this vector changing the components of this
vector.
|
static Vector2 |
Vector2.subtract(Vector2 a,
Vector2 b)
Returns a new
Vector2D equal to a - b . |
Modifier and Type | Method and Description |
---|---|
Vector2 |
Vector2.add(Vector2 other)
Add a vector to this vector changing the components of this vector.
|
static Vector2 |
Vector2.add(Vector2 a,
Vector2 b)
Returns a new
Vector2D equal to a + b . |
static Vector2 |
Vector2.multiply(double s,
Vector2 a)
Returns a new
Vector2D equal to s * a . |
boolean |
Vector2.similarTo(Vector2 other,
double tol)
Determines if two vectors are almost equal (similar).
|
Vector2 |
Vector2.subtract(Vector2 other)
Subtract a vector from this vector changing the components of this
vector.
|
static Vector2 |
Vector2.subtract(Vector2 a,
Vector2 b)
Returns a new
Vector2D equal to a - b . |
Constructor and Description |
---|
Vector2(Vector2 other)
Creates a vector with the same components as another vector.
|