Package | Description |
---|---|
game | |
gui |
Modifier and Type | Method and Description |
---|---|
Vector |
Vector.addVector(Vector v)
Add v's components to this vector and
return this Vector
|
Vector |
Vector.invert()
Invert both of this' components - change this vector to <1/x, 1/y> --
and returns this Vector.
|
Vector |
Vector.mult(double s)
Multiply both of this vector's components by s and
return this Vector.
|
Vector |
Vector.to(Vector b)
Return a new vector from this to b.
|
Vector |
Vector.unit()
Make this vector have length 1, with the same direction, and
Return this Vector.
|
Modifier and Type | Method and Description |
---|---|
Vector |
Vector.addVector(Vector v)
Add v's components to this vector and
return this Vector
|
double |
Vector.cos(Vector b)
Return the cosine of the angle between this and b.
|
static double |
Vector.cos(Vector a,
Vector b)
Return the cosine of the angle between a and b
|
double |
Vector.cross(Vector b)
Return the cross product of this and b.
|
static double |
Vector.cross(Vector a,
Vector b)
Return the cross product of a and b.
|
double |
Vector.distance(Vector b)
Return the distance between this vector and b.
|
static double |
Vector.distance(Vector a,
Vector b)
Return the distance between a and b.
|
double |
Vector.dot(Vector b)
Return the dot product of this Vector and b.
|
static double |
Vector.dot(Vector a,
Vector b)
Return the dot product of a and b/
|
static double |
Vector.length(Vector a)
Return the length of a.
|
double |
Vector.radAngle(Vector b)
Returns the angle between this and b, in radians.
|
static double |
Vector.radAngle(Vector a,
Vector b)
Return the angle between a and b, in radians.
|
Vector |
Vector.to(Vector b)
Return a new vector from this to b.
|
Constructor and Description |
---|
Vector(Vector v)
Constructor: a vector with same values as v.
|
Modifier and Type | Method and Description |
---|---|
Vector |
Circle.getVectorTo(Circle c)
Return the vector from the center of this circle to the center of c.
|