Merge pull request #695 from ilya-epifanov/fix-givens-rotation-default
GivensRotation::new() should default to (I, 0)
This commit is contained in:
commit
52ca5c95ef
@ -38,7 +38,8 @@ impl<N: ComplexField> GivensRotation<N> {
|
||||
|
||||
/// Initializes a Givens rotation from its non-normalized cosine an sine components.
|
||||
pub fn new(c: N, s: N) -> (Self, N) {
|
||||
Self::try_new(c, s, N::RealField::zero()).unwrap()
|
||||
Self::try_new(c, s, N::RealField::zero())
|
||||
.unwrap_or_else(|| (GivensRotation::identity(), N::zero()))
|
||||
}
|
||||
|
||||
/// Initializes a Givens rotation form its non-normalized cosine an sine components.
|
||||
|
Loading…
Reference in New Issue
Block a user