Simplify DotProductC function