/// Returns guiding direction (unit vector in RA&Dec space) in order to move along `target_offset` in image space.
Returns guiding direction (unit vector in RA&Dec space) in order to move along `target_offset` in image space.
Returns guiding direction ( unit vector in RA&Dec space ) in order to move along ` target_offset ` in image space .
fn guiding_direction(img_to_mount_axes_matrix: &[[f64; 2]; 2], target_offset: ga_image::point::Point) -> (f64, f64) {
    #[allow(non_snake_case)]
    let M = img_to_mount_axes_matrix;
    let mut guide_dir_axis_space: (f64, f64) = (
        M[0][0] * target_offset.x as f64 + M[0][1] * target_offset.y as f64,
        M[1][0] * target_offset.x as f64 + M[1][1] * target_offset.y as f64
    );
    let len = (guide_dir_axis_space.0.powi(2) + guide_dir_axis_space.1.powi(2)).sqrt();
    guide_dir_axis_space.0 /= len;
    guide_dir_axis_space.1 /= len;
    guide_dir_axis_space
}
fn guiding_direction ( img_to_mount_axes_matrix : & [ [ f64 ; 2 ] ; 2 ] , target_offset : ga_image :: point :: Point ) -> ( f64 , f64 ) { # [ allow ( non_snake_case ) ] let M = img_to_mount_axes_matrix ; let mut guide_dir_axis_space : ( f64 , f64 ) = ( M [ 0 ] [ 0 ] * target_offset . x as f64 + M [ 0 ] [ 1 ] * target_offset . y as f64 , M [ 1 ] [ 0 ] * target_offset . x as f64 + M [ 1 ] [ 1 ] * target_offset . y as f64 ) ; let len = ( guide_dir_axis_space . 0 . powi ( 2 ) + guide_dir_axis_space . 1 . powi ( 2 ) ) . sqrt ( ) ; guide_dir_axis_space . 0 /= len ; guide_dir_axis_space . 1 /= len ; guide_dir_axis_space }
Returns guiding direction (unit vector in RA&Dec space) in order to move along `target_offset` in image space.
Returns guiding direction ( unit vector in RA&Dec space ) in order to move along ` target_offset ` in image space .
img_to_mount_axes_matrix
&[[f64; 2]; 2]
target_offset
ga_image::point::Point