Added target block ray trace functionality.
This commit is contained in:
@@ -126,6 +126,19 @@ public class Vector implements Cloneable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies another vector
|
||||
*
|
||||
* @param vec
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector copy(Vector vec) {
|
||||
x = vec.x;
|
||||
y = vec.y;
|
||||
z = vec.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the magnitude of the vector, defined as sqrt(x^2+y^2+z^2). The value
|
||||
* of this method is not cached and uses a costly square-root function, so
|
||||
|
||||
Reference in New Issue
Block a user