rfa 0.5.9

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


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

   let a00 = c*r[0][0] - s*r[2][0];
   let a01 = c*r[0][1] - s*r[2][1];
   let a02 = c*r[0][2] - s*r[2][2];
   let a20 = s*r[0][0] + c*r[2][0];
   let a21 = s*r[0][1] + c*r[2][1];
   let a22 = s*r[0][2] + c*r[2][2];

   r[0][0] = a00;
   r[0][1] = a01;
   r[0][2] = a02;
   r[2][0] = a20;
   r[2][1] = a21;
   r[2][2] = a22;

/* Finished. */

}