fn rho_squared(r: V3) -> (f64, V3, M33) {
    let value = r[0]*r[0] + r[1]*r[1];
    let d_r = V3([2.0*r[0], 2.0*r[1], 0.0]);
    let dd_r_r = M33::from_diag(V3([2.0, 2.0, 0.0]));

    (value, d_r, dd_r_r)
}
/// Calculate the square of the transverse distance given the distance squared,
/// the distance vector r.
Calculate the square of the transverse distance given the distance squared,
the distance vector r.
Calculate the square of the transverse distance given the distance squared the distance vector r .
fn rho_squared(r: V3) -> (f64, V3, M33) {
    let value = r[0]*r[0] + r[1]*r[1];
    let d_r = V3([2.0*r[0], 2.0*r[1], 0.0]);
    let dd_r_r = M33::from_diag(V3([2.0, 2.0, 0.0]));
    (value, d_r, dd_r_r)
}
fn rho_squared ( r : V3 ) -> ( f64 , V3 , M33 ) { let value = r [ 0 ] * r [ 0 ] + r [ 1 ] * r [ 1 ] ; let d_r = V3 ( [ 2.0 * r [ 0 ] , 2.0 * r [ 1 ] , 0.0 ] ) ; let dd_r_r = M33 :: from_diag ( V3 ( [ 2.0 , 2.0 , 0.0 ] ) ) ; ( value , d_r , dd_r_r ) }
Calculate the square of the transverse distance given the distance squared,
the distance vector r.
Calculate the square of the transverse distance given the distance squared the distance vector r .
r
V3
r
V3