/** * checks if vector is Collinear to given vector * * @return true if vectors are Collinear else false */ public boolean isCollinearTo(Vector3D V) { if (Math.abs(this.DotProduct(V)) == this.getLength() * V.getLength()) { return true; } else { return false; } }
/** * checks if vector is parallel to given vector * * @return true if vectors are parallel else false */ public boolean isParallel_to(Vector3D V) { if (this.DotProduct(V) == this.getLength() * V.getLength()) { return true; } else { return false; } }