Using SVector{3,T} for the eltype of UnitSphere is problematic since almost no floating point numbers are in it!
Here I have SphericalCoordinate where norm is hard coded to be 1:
https://github.com/JuliaApproximation/HarmonicOrthogonalPolynomials.jl/blob/13b134b6cddf086783cf260a691dbb6bc5f13fbd/src/coordinates.jl#L42
I think this would be a better default choice
Using
SVector{3,T}for the eltype ofUnitSphereis problematic since almost no floating point numbers are in it!Here I have
SphericalCoordinatewherenormis hard coded to be 1:https://github.com/JuliaApproximation/HarmonicOrthogonalPolynomials.jl/blob/13b134b6cddf086783cf260a691dbb6bc5f13fbd/src/coordinates.jl#L42
I think this would be a better default choice