Skip to content

Commit

Permalink
compare function and limits
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Dec 22, 2014
1 parent 50c3625 commit 37f2250
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/src/compare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

var compare = function ( a , b ) {

return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 :
a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0 ;

} ;

exports.compare = compare ;
6 changes: 6 additions & 0 deletions js/src/limits.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

/** 0 */
exports.min = [ 0x00000000 , 0x00000000 ] ;

/** 2^64 - 1 */
exports.max = [ 0xffffffff , 0xffffffff ] ;

0 comments on commit 37f2250

Please sign in to comment.