feat(Complex): Define return types of all operations
This commit is contained in:
parent
de42c22ab4
commit
23b3ef4fdd
9 changed files with 44 additions and 16 deletions
|
@ -49,6 +49,12 @@ describe('The default full pocomath instance "math"', () => {
|
|||
math.abs(math.complex(2,1)) //TODO: ditto
|
||||
assert.strictEqual(
|
||||
math.returnTypeOf('abs','Complex<NumInt>'), 'number')
|
||||
math.multiply(math.quaternion(1,1,1,1), math.quaternion(1,-1,1,-1)) // dit
|
||||
const quatType = math.returnTypeOf(
|
||||
'quaternion', 'NumInt,NumInt,NumInt,NumInt')
|
||||
assert.strictEqual(quatType, 'Complex<Complex<NumInt>>')
|
||||
assert.strictEqual(
|
||||
math.returnTypeOf('multiply', quatType + ',' + quatType), quatType)
|
||||
})
|
||||
|
||||
it('can subtract numbers', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue