Skip to content

Commit 64400b3

Browse files
committed
fix deprecation warning
1 parent b846099 commit 64400b3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ where
160160
/// Takes `world`, a matrix of 3D world coordinates, and `cam` a matrix of 2D
161161
/// camera coordinates, which is the image of the world coordinates via the
162162
/// desired projection matrix. Generic over `N`, the number of points, which
163-
/// must be at least `nalgebra::U6`, and can also be `nalgebra::Dynamic`. Also
163+
/// must be at least `nalgebra::U6`, and can also be `nalgebra::Dyn`. Also
164164
/// generic over `R`, the data type, which must implement `nalgebra::RealField`.
165165
///
166166
/// You may find it more ergonomic to use the
@@ -255,10 +255,10 @@ pub fn dlt_corresponding<R: RealField + Copy>(
255255
points: &[CorrespondingPoint<R>],
256256
epsilon: R,
257257
) -> Result<SMatrix<R, 3, 4>, &'static str> {
258-
let nrows = nalgebra::Dynamic::from_usize(points.len());
259-
// let u2 = nalgebra::Dynamic::from_usize(2);
258+
let nrows = nalgebra::Dyn::from_usize(points.len());
259+
// let u2 = nalgebra::Dyn::from_usize(2);
260260
let u2 = U2::from_usize(2);
261-
// let u3 = nalgebra::Dynamic::from_usize(3);
261+
// let u3 = nalgebra::Dyn::from_usize(3);
262262
let u3 = U3::from_usize(3);
263263

264264
let world_mat = nalgebra::OMatrix::from_fn_generic(nrows, u3, |i, j| points[i].object_point[j]);
@@ -271,7 +271,7 @@ pub fn dlt_corresponding<R: RealField + Copy>(
271271

272272
#[cfg(test)]
273273
mod tests {
274-
use nalgebra::{Dynamic, OMatrix, U2, U3, U4, U8};
274+
use nalgebra::{Dyn, OMatrix, U2, U3, U4, U8};
275275

276276
#[test]
277277
fn test_dlt_corresponding() {
@@ -332,7 +332,7 @@ mod tests {
332332

333333
let n_points = x3dh_data.len() / 4;
334334

335-
let x3dh = OMatrix::<_, Dynamic, U4>::from_row_slice(&x3dh_data);
335+
let x3dh = OMatrix::<_, Dyn, U4>::from_row_slice(&x3dh_data);
336336

337337
// example camera calibration matrix
338338
#[rustfmt::skip]
@@ -355,7 +355,7 @@ mod tests {
355355
data.push(r / t);
356356
data.push(s / t);
357357
}
358-
let x2d_expected = OMatrix::<_, Dynamic, U2>::from_row_slice(&data);
358+
let x2d_expected = OMatrix::<_, Dyn, U2>::from_row_slice(&data);
359359

360360
// convert homogeneous 3D coords into normal 3D coords
361361
let x3d = x3dh.fixed_columns::<3>(0).into_owned();
@@ -374,7 +374,7 @@ mod tests {
374374
data.push(r / t);
375375
data.push(s / t);
376376
}
377-
let x2d_actual = OMatrix::<_, Dynamic, U2>::from_row_slice(&data);
377+
let x2d_actual = OMatrix::<_, Dyn, U2>::from_row_slice(&data);
378378

379379
assert_eq!(x2d_expected.nrows(), x2d_actual.nrows());
380380
assert_eq!(x2d_expected.ncols(), x2d_actual.ncols());

0 commit comments

Comments
 (0)