Function geo_nd::vector::dot

source ·
pub fn dot<V: Num, const D: usize>(v: &[V; D], other: &[V; D]) -> V
Expand description

Return the inner product (aka dot product or scalar product) of this and another vector

Example

use geo_nd::vector;
assert_eq!( vector::dot(&[1.,-1.], &[4., 1.]), 3. );