Function glm::builtin::dot [] [src]

pub fn dot<S: BaseFloat, T: GenFloatVec<S>>(x: T, y: T) -> S

Returns the dot product of x and y, i.e., x[0] * y[0] + x[1] * y[1] + ....

Example

use glm::{ dot, vec2 };

let v1 = vec2(1., 2.);
let v2 = vec2(3., 4.);
assert_eq!(dot(v1, v2), 11.);