Skip to content

Commit

Permalink
- Added auto-stringification for Complex numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
trizen committed Sep 10, 2015
1 parent fba18cc commit 6dae437
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Sidef/Types/Number/Complex.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ package Sidef::Types::Number::Complex {
Sidef::Types::Number::Number
);

use overload
q{""} => \&get_value,
q{bool} => \&get_value;

sub new {
my (undef, $x, $y) = @_;

Expand Down

0 comments on commit 6dae437

Please sign in to comment.