use kalast::toolbox::matrix::slice_to_array;
use kalast::V3X;

#[test]
fn conversion_from_slice_to_array() {
    let matrix = V3X::from_column_slice(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]);
    let columns = &mut matrix.column_iter();
    assert_eq!(
        slice_to_array(&mut columns.next().unwrap()),
        matrix.column(0)
    );
    assert_eq!(
        slice_to_array(&mut columns.next().unwrap()),
        matrix.column(1)
    );
    assert_eq!(slice_to_array(&matrix.columns(0, 2)), matrix);
}
