Defines a mathematical function in the field of complex numbers.
The rule of the function, which can be a single function that takes a complex number or an array of two functions that take real and imaginary parts respectively.
// Defines f(z) = z² or f(a+bi) = (a²-b²) + (2ab)iconst f = Chalkboard.comp.define((z) => Chalkboard.comp.sq(z));// Defines g(a+bi) = (a²-b²) + (2ab)i or g(z) = z²const g = Chalkboard.comp.define([ (a, b) => a*a - b*b, (a, b) => 2*a*b]); Copy
// Defines f(z) = z² or f(a+bi) = (a²-b²) + (2ab)iconst f = Chalkboard.comp.define((z) => Chalkboard.comp.sq(z));// Defines g(a+bi) = (a²-b²) + (2ab)i or g(z) = z²const g = Chalkboard.comp.define([ (a, b) => a*a - b*b, (a, b) => 2*a*b]);
Defines a mathematical function in the field of complex numbers.