applyComplexFunction method

void applyComplexFunction(
  1. Complex func(
    1. Complex
    )
)

Implementation

void applyComplexFunction(Complex Function(Complex) func) {
  Vector3 funcR3(Vector3 pt) {
    var startComplex = Complex(real: pt.x, imaginary: pt.y);
    var resultComplex = func(startComplex);
    var resultPoint =
        Vector3(resultComplex.real, resultComplex.imaginary, pt.z);
    return resultPoint;
  }

  return applyOverPoints(func: funcR3);
}