feat: add number negate and roll up number functions into one module
This commit is contained in:
parent
f5e2e09aa2
commit
a22add9434
4 changed files with 11 additions and 2 deletions
|
@ -7,4 +7,8 @@ describe('The default full pocomath instance "math"', () => {
|
|||
assert.strictEqual(math.add(1.5, 2.5, 3.5), 7.5)
|
||||
assert.strictEqual(math.add(Infinity), Infinity)
|
||||
})
|
||||
it('can negate numbers', () => {
|
||||
assert.strictEqual(math.negate(-1), 1)
|
||||
assert.strictEqual(math.add(10, math.negate(3)), 7)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue