got rid of the dotProduct helper function to make the C mahalanobisHelper faster, safer, and a bit more memory efficient