public interface GenericVector<Vector extends GenericVector<Vector,Type>,Type>
Modifier and Type | Method and Description |
---|---|
Vector |
add(Vector v)
Adds the given vector to this vector
|
Vector |
cpy() |
Type |
dot(Vector v) |
Type |
len() |
Type |
len2()
This method is faster than
Vector.len() because it avoids calculating a square root. |
Vector |
nor()
Normalizes this vector.
|
Vector |
scl(Type scalar)
Scales this vector by a scalar
|
Vector |
set(Vector v)
Sets this vector from the given vector
|
Vector |
sub(Vector v)
Subtracts the given vector from this vector.
|
Vector cpy()
Type len()
Type len2()
Vector.len()
because it avoids calculating a square root. It is useful for comparisons,
but not for getting exact lengths, as the return value is the square of the actual length.Vector set(Vector v)
v
- The vectorVector sub(Vector v)
v
- The vectorVector nor()
Vector add(Vector v)
v
- The vectorType dot(Vector v)
v
- The other vectorCopyright © 2020. All rights reserved.