pocomath/complex/negate.mjs
Glen Whitney 66cbccfbbe feat: Allow self-reference in implementations
And use it to define negate and add for Complex numbers in a way that
  is independent of component types.

  Also add a bigint type and verify that pocomath will then handle Gaussian
  integers "for free".
2022-07-19 11:16:29 -07:00

5 lines
128 B
JavaScript

import './Complex.mjs'
export const negate = {
Complex: [['self'], ref => z => ({re: ref.self(z.re), im: ref.self(z.im)})]
}