Skip to content

Commit

Permalink
add note about div precision
Browse files Browse the repository at this point in the history
closes #6
  • Loading branch information
defunctzombie committed May 3, 2013
1 parent 0a55466 commit 9263208
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Besides the **num** function, all of the other methods operate on the objects re
### div (value) ###
> divide our num by {value} and return a new num
```
// note that `div` uses the precision of the numerator
num('1').div('3.0') -> 0
num('1.0').div('3') -> 0.3
```

### neg ###
> return a new num that is the negative
Expand Down
1 change: 0 additions & 1 deletion test/div.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ test('div', function() {
assert.equal(num('1.0').div(2), '0.5');
assert.equal(num('1.00').div(20), '0.05');

// TODO what should this really do?
assert.equal(num('1.0').div(3), '0.3');
assert.equal(num('1.000').div('3'), '0.333');
});
Expand Down

1 comment on commit 9263208

@abrkn
Copy link

@abrkn abrkn commented on 9263208 Jun 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.