7 lines
199 B
JavaScript
7 lines
199 B
JavaScript
|
import { isComplex } from './complex.js'
|
||
|
|
||
|
export default function create(pmath) {
|
||
|
return pmath('negate', [args => args.length == 1 && isComplex(args[0]),
|
||
|
z => ({re: -z.re, im: -z.im})])
|
||
|
}
|