Added target block ray trace functionality.

This commit is contained in:
Raphfrk
2011-02-13 17:03:57 +00:00
committed by EvilSeph
parent 993fcb2895
commit c6d4b1c3c6
4 changed files with 455 additions and 2 deletions

View File

@@ -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