You could implement Vectors in Java usingThe Vecmathvecmath
-package from Java 3D can be used separately from the rest of the project. Its documentationIt allows in-place modification of vectors and has various methods that are convenient and efficient for games (such as lengthSquared
, which avoids a √-operation).
vecmath.jar
is 312K and works well separately from the rest of Java3D. It may be included under javax.vecmath
in some Java distributions, but you can download it at the below link if not.