Ruby | Vector inner_product() function
The inner_product() is an inbuilt method in Ruby returns dot product of given vectors. Syntax: vec1.inner_product(vec2) Parameters: The function accepts a single vector as parameters Return Value: It returns dot product of given vectors Example 1: C/C++ Code #Ruby program for inner_product() method