|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VectorMath
Interface to define operations associated with Vector mathematics.
Method Summary | |
---|---|
Vector |
cross(Vector vector)
Get the cross-product vector based on the current Vector and the given Vector. |
Vector |
divide(double scalar)
Divide the elements of the current Vector by the provided scalar . |
double |
dot(Vector vector)
Calculate the vector dot product of the current Vector and the given Vector. |
Vector |
multiply(double scalar)
Multiply a scalar with each component in the Vector . |
double |
norm()
Calculate the norm of this Vector object. |
Vector |
normalize()
Create a unit vector from the current Vector. |
Vector |
plus(Vector vector)
Adding this Vector to another will result in a resultant Vector . |
Vector |
subtract(Vector vector)
Subtract the provided Vector from the current Vector . |
Method Detail |
---|
Vector plus(Vector vector)
Vector
to another will result in a resultant Vector
.
vector
- The Vector
to add to the current one
Vector
Vector subtract(Vector vector)
Vector
from the current Vector
.
The result of the subtraction operation is a new Vector
instance,
maintaining the immutability of the operation.
vector
- The Vector
to subtract.
Vector
instance representing the result of the operation.Vector divide(double scalar)
Vector
by the provided scalar
.
scalar
- The value to divide all elements within the Vector
by.
Vector
instance containing the result of the operator.Vector multiply(double scalar)
scalar
with each component in the Vector
.
scalar
- The scalar to multiply in.
Vector
instance containing the result of the operator.double norm()
Numeric
.
Vector normalize()
double dot(Vector vector)
vector
- The given Vector object with which the vector dot
product is to be calculated.
Vector cross(Vector vector)
vector
- The specified Vector with with the cross product operation is to be performed.
ArithmeticException
- if vectors are invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |