Skip to content

Commit

Permalink
probably a bad test for polarize, but at should at least pass travis/…
Browse files Browse the repository at this point in the history
…local testing
  • Loading branch information
ekmett committed Sep 11, 2012
1 parent f752511 commit 7f2c7e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Data/Complex/Lens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ imaginary f (a :+ b) = (a :+) <$> f b
-- (1.0,1.5707963267948966)
--
-- >>> (1.0,pi)^.from polarize
-- (-1.0) :+ 1.2246467991473532e-16
-- (-1.0) :+ 1.2246063538223773e-16

polarize :: (RealFloat a, RealFloat b) => Iso (Complex a) (Complex b) (a,a) (b,b)
polarize = isos polar (uncurry mkPolar)
polar (uncurry mkPolar)
Expand Down

0 comments on commit 7f2c7e5

Please sign in to comment.