Merge pull request #1113 from trueb2/user/trueb2/fix-unitcomplex-assertion

Fix UnitComplex cast doctest failure on macOS
This commit is contained in:
Sébastien Crozet 2022-07-30 17:33:13 +02:00 committed by GitHub
commit d0d88f1e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -131,10 +131,11 @@ where
///
/// # Example
/// ```
/// #[macro_use] extern crate approx;
/// # use nalgebra::UnitComplex;
/// let c = UnitComplex::new(1.0f64);
/// let c2 = c.cast::<f32>();
/// assert_eq!(c2, UnitComplex::new(1.0f32));
/// assert_relative_eq!(c2, UnitComplex::new(1.0f32));
/// ```
pub fn cast<To: Scalar>(self) -> UnitComplex<To>
where