Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmasson committed Jan 19, 2021
1 parent 742bb86 commit a9c3631
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions build/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -2980,9 +2980,7 @@ function floor( x ) {

function sign( x ) {

if ( isZero(x) )
if ( isComplex(x) ) return complex(0);
else return 0;
if ( isZero(x) ) return x;

return div( x, abs(x) );

Expand Down
4 changes: 1 addition & 3 deletions src/functions/miscellaneous.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ function floor( x ) {

function sign( x ) {

if ( isZero(x) )
if ( isComplex(x) ) return complex(0);
else return 0;
if ( isZero(x) ) return x;

return div( x, abs(x) );

Expand Down

0 comments on commit a9c3631

Please sign in to comment.