Skip to content

Conversation

keeganmccallum
Copy link
Contributor

No description provided.

@mdtusz
Copy link
Contributor

mdtusz commented Jun 27, 2016

Instead of coercing to a string, could we instead just ensure a more robust check on the case of -0?

function isPositive(x){
  return 1 / x === 1 / Math.abs(x);
}

isPositive(0) // true
isPositive(-0) // false

If you could also add a test or two for this, that would be great! Thanks for the contribution!

@etpinard etpinard added bug something broken status: reviewable labels Jun 27, 2016
@etpinard
Copy link
Contributor

etpinard commented Jul 5, 2016

@keeganmccallum I cherry-picked your commits onto the fix-bar-relative-first-bucket to add a few tests using a testing routine introduced in #716 .

I'll close this PR and make a new one (that includes your commits) as soon as #716 is merged.

Thanks again for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug something broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants