feat: add cis and fix indistinguishable
All checks were successful
/ test (pull_request) Successful in 16s

This commit is contained in:
Glen Whitney 2025-04-24 20:52:43 -07:00
parent 7daa621571
commit 7903a46118
3 changed files with 10 additions and 3 deletions

View file

@ -49,4 +49,7 @@ export const associate = match([Complex, Complex], (math, [W, Z]) => {
const iz = mult(iZ, z)
return eqM(w, iz) || eqNM(w, negM(iz))
})
})
})
export const cis = match(NumberT, Returns(Complex(NumberT), t => ({
re: Math.cos(t), im: Math.sin(t)})))