feat(return types): Add more return types for complex functions
These changes greatly increased the need for precision in generating implementations for signatures of operations whenever possible. So this commit also includes a refactor that basically caches all of the conversions of Pocomath implementations to typed-function implementatios so that they are more often externally available (i.e., not disrupted so much after invalidation).
This commit is contained in:
parent
bc434c7163
commit
a2f76a55b8
13 changed files with 273 additions and 98 deletions
|
@ -83,6 +83,7 @@ describe('complex', () => {
|
|||
assert.deepStrictEqual(
|
||||
math.multiply(q0, math.quaternion(2, 1, 0.1, 0.1)),
|
||||
math.quaternion(1.9, 1.1, 2.1, -0.9))
|
||||
math.absquare(math.complex(1.25, 2.5)) //HACK: need absquare(Complex<number>)
|
||||
assert.strictEqual(math.abs(q0), Math.sqrt(2))
|
||||
assert.strictEqual(math.abs(q1), Math.sqrt(33)/4)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue