rfa 0.5.9

A port ERFA to Rust.
Documentation
use crate::utils::*;
///  Rotate an r-matrix about the x-axis.
///
///  Given:
///    * phi angle (radians)
///    * r-matrix
///
///  Given and returned:
///    * r src matrix, rotated about the x-axis
///
/// # Notes:
///
///  1) Calling this function with positive phi incorporates in the
///     supplied r-matrix r an additional rotation, about the x-axis,
///     anticlockwise as seen looking towards the origin from positive x.
///
///  2) The additional rotation can be represented by this matrix:
///
///         (  1        0            0      )
///         (                               )
///         (  0   + cos(phi)   + sin(phi)  )
///         (                               )
///         (  0   - sin(phi)   + cos(phi)  )
///
///  This revision:  2021 May 11

pub fn rx(phi: f64, r:&mut [[f64; 3];3])
{


   let s = sin(phi);
   let c = cos(phi);

   let a10 =   c*r[1][0] + s*r[2][0];
   let a11 =   c*r[1][1] + s*r[2][1];
   let a12 =   c*r[1][2] + s*r[2][2];
   let a20 = - s*r[1][0] + c*r[2][0];
   let a21 = - s*r[1][1] + c*r[2][1];
   let a22 = - s*r[1][2] + c*r[2][2];

   r[1][0] = a10;
   r[1][1] = a11;
   r[1][2] = a12;
   r[2][0] = a20;
   r[2][1] = a21;
   r[2][2] = a22;

/* Finished. */

}