Skip to content

Commit

Permalink
fix(float): Avoid whole segment colliding with int()
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvdm committed Apr 30, 2020
1 parent 9a5bbc8 commit b38f5ad
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions float.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var hash = require('./hash')

module.exports = function float(input) {
var whole = hash(input)
return +(whole + '.' + hash(whole))
var whole = hash([input, 'float', 0])
return +(whole + '.' + hash([whole, 'float', 1]))
}

0 comments on commit b38f5ad

Please sign in to comment.