3 lines
107 B
C#
3 lines
107 B
C#
public static decimal DotProduct(decimal[] a, decimal[] b) {
|
|
return a.Zip(b, (x, y) => x * y).Sum();
|
|
}
|