// qResult = (- vectorQ . vector) + (scalarQ * vector + vectorQ ^ vector)
final double[] vectorQ = quaternion.getVectorPart();
final double[] vectorResultQxV = qResultQxV.getVectorPart();
final double scalarPartRefQxV = -Vector3D.dotProduct(new Vector3D(vectorQ), new Vector3D(vector));
Assert.assertEquals(scalarPartRefQxV, qResultQxV.getScalarPart(), EPS);
final Vector3D vectorPartRefQxV = (new Vector3D(vector).scalarMultiply(quaternion.getScalarPart())).add(Vector3D
.crossProduct(new Vector3D(vectorQ), new Vector3D(vector)));
final double normQxV = (new Vector3D(vectorResultQxV).subtract(vectorPartRefQxV)).getNorm();
Assert.assertEquals(0, normQxV, EPS);
// Case : Product between a vector and a quaternion : VxQ
final Quaternion qResultVxQ = Quaternion.multiply(new Quaternion(vector), quaternion);
Assert.assertEquals(-19, qResultVxQ.getQ0(), EPS);
Assert.assertEquals(13, qResultVxQ.getQ1(), EPS);
Assert.assertEquals(21, qResultVxQ.getQ2(), EPS);
Assert.assertEquals(3, qResultVxQ.getQ3(), EPS);
final double[] vectorResultVxQ = qResultVxQ.getVectorPart();
// comparison with the result given by the formula :
// qResult = (- vector . vectorQ) + (scalarQ * vector + vector ^ vectorQ)
final double scalarPartRefVxQ = -Vector3D.dotProduct(new Vector3D(vectorQ), new Vector3D(vector));
Assert.assertEquals(scalarPartRefVxQ, qResultVxQ.getScalarPart(), EPS);
final Vector3D vectorPartRefVxQ = (new Vector3D(vector).scalarMultiply(quaternion.getScalarPart())).add(Vector3D
.crossProduct(new Vector3D(vector), new Vector3D(vectorQ)));
final double normVxQ = (new Vector3D(vectorResultVxQ).subtract(vectorPartRefVxQ)).getNorm();
Assert.assertEquals(0, normVxQ, EPS);
}