Skip to content

Commit

Permalink
Restore map OR'ing
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Waldron <[email protected]>
  • Loading branch information
rwaldron committed Jul 27, 2016
1 parent 6c2097c commit 7201e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Fn.fscale = Fn.fmap;
// Retun int
//
Fn.map = function(value, fromLow, fromHigh, toLow, toHigh) {
return (value - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow;
return ((value - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow) | 0;
};

// Alias
Expand Down

0 comments on commit 7201e45

Please sign in to comment.