Skip to content

7.0.0

Choose a tag to compare

@patrickroberts patrickroberts released this 28 Dec 03:01
· 3 commits to master since this release

Complete rewrite of complex math library using TDD.

Functions removed:

  • and
  • equals
  • or
  • sal
  • sar
  • shl
  • shr
  • xor
  • ceil
  • cube
  • floor
  • neg
  • not
  • random
  • round
  • sign
  • square

Functions planned to be re-implemented:

  • ceil
  • floor
  • round
  • random

Breaking changes:
compile no longer accepts a reviver function. Return value must manually be wrapped with a reviver if necessary.

// before
import Complex from 'complex-js';
const f = Complex.compile('a+b', (a, b) => ({ a, b }));
f(Complex.E, Complex.I);

// after
import { compile, E, I } from 'complex-js';
const f = compile('a+b');
f({ a: E, b: I });