Implement Default for Complex

Fixes #198
This commit is contained in:
Adam Crume 2016-06-28 19:44:52 -07:00
parent f0bc5596af
commit c7c974ec4b
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ use traits::{Zero, One, Num, Float};
// probably doesn't map to C's _Complex correctly.
/// A complex number in Cartesian form.
#[derive(PartialEq, Copy, Clone, Hash, Debug)]
#[derive(PartialEq, Copy, Clone, Hash, Debug, Default)]
#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
pub struct Complex<T> {
/// Real portion of the complex number