Added Vector.dot(Vector).

This commit is contained in:
TomyLobo 2011-12-05 23:17:13 +01:00
parent 274ecaadf2
commit a5a761a126

View File

@ -612,6 +612,16 @@ public class Vector {
return new BlockVector(this);
}
/**
* Gets the dot product of this and another vector.
*
* @param other
* @return the dot product of this and the other vector
*/
public double dot(Vector other) {
return x * other.x + y * other.y + z * other.z;
}
/**
* Gets the minimum components of two vectors.
*