pub fn dot(g: &[f64; 3], x: f64, y: f64, z: f64) -> f64
Dot product of gradient vector and offset vector.