Closed jacklovell closed 4 years ago
@CnlPepper would you mind giving this a review?
Sorry been distracted lately, I'll have a look asap.
I'm going to merge this into the feature/function branch and make the base class changes we need to prevent invalid functions being converted to python wrapped functions.
OK. I think there were only a few other changes to make, including adding comments to some of the dunder methods. I can pick it up again after you've made any changes you want (if you feel there are any changes still needed).
Initial support is for VectorFunction2D. It's based on Function2D, but when evaluated these functions return a Vector3D instead of a double. Constant and auto wrapping are also provided. Arithmetic methods are provided, but only for operands which are supported by Vector3D cython methods (add, sub, mul, div).
I'm just uploading the 2D case to begin with, to keep the PR manageable. Once this is approved, I'll add the 1D and 3D functions too.
This PR was motivated by https://github.com/cherab/core/pull/214/