Correct bad scalar product calculation

Signed-off-by: Axel Davy <axel.davy@ens.fr>