jipolanco / BSplineKit.jl

A collection of B-spline tools in Julia
https://jipolanco.github.io/BSplineKit.jl/dev/
MIT License
50 stars 9 forks source link

Make `Spline` a subtype of `Function` #90

Closed jipolanco closed 5 months ago

jipolanco commented 5 months ago

Same for SplineWrapper.

This allows to use splines where a Function is expected.

One example is for plots with Makie. Instead of doing:

lines!(ax, 0..3, x -> S(x))

we can now simply do:

lines!(ax, 0..3, S)

for a spline S.