/// Creates a matrix transforming image-space vectors to mount-axes-space.
///
/// # Parameters
///
/// * `primary_dir` - Direction in image space corresponding to positive slew around primary axis.
/// * `secondary_dir` - Direction in image space corresponding to positive slew around secondary axis.
///
Creates a matrix transforming image-space vectors to mount-axes-space.
Creates a matrix transforming image - space vectors to mount - axes - space .
pub fn create_img_to_mount_axes_matrix(primary_dir: (f64, f64), secondary_dir: (f64, f64)) -> [[f64; 2]; 2] {
    // telescope-axes-space-to-image-space transformation matrix
    let axes_to_img: [[f64; 2]; 2] = [[primary_dir.0, secondary_dir.0], [primary_dir.1, secondary_dir.1]];
    let determinant = axes_to_img[0][0] * axes_to_img[1][1] - axes_to_img[0][1] * axes_to_img[1][0];
    // axes_to_img⁻¹
    [
        [ axes_to_img[1][1] / determinant, -axes_to_img[0][1] / determinant],
        [-axes_to_img[1][0] / determinant,  axes_to_img[0][0] / determinant]
    ]
}
pub fn create_img_to_mount_axes_matrix ( primary_dir : ( f64 , f64 ) , secondary_dir : ( f64 , f64 ) ) -> [ [ f64 ; 2 ] ; 2 ] { // telescope-axes-space-to-image-space transformation matrix let axes_to_img : [ [ f64 ; 2 ] ; 2 ] = [ [ primary_dir . 0 , secondary_dir . 0 ] , [ primary_dir . 1 , secondary_dir . 1 ] ] ; let determinant = axes_to_img [ 0 ] [ 0 ] * axes_to_img [ 1 ] [ 1 ] - axes_to_img [ 0 ] [ 1 ] * axes_to_img [ 1 ] [ 0 ] ; // axes_to_img⁻¹ [ [ axes_to_img [ 1 ] [ 1 ] / determinant , - axes_to_img [ 0 ] [ 1 ] / determinant ] , [ - axes_to_img [ 1 ] [ 0 ] / determinant , axes_to_img [ 0 ] [ 0 ] / determinant ] ] }
Creates a matrix transforming image-space vectors to mount-axes-space.
Creates a matrix transforming image - space vectors to mount - axes - space .
primary_dir
(f64, f64)
secondary_dir
(f64, f64)