diff --git a/src/specializations/BezierCurve.jl b/src/specializations/BezierCurve.jl index b149dc78..cb763698 100644 --- a/src/specializations/BezierCurve.jl +++ b/src/specializations/BezierCurve.jl @@ -91,7 +91,7 @@ function integral( # Create a wrapper that returns only the value component in those units uintegrand(uv) = Unitful.ustrip.(integrandunits, integrand(uv)) # Integrate only the unitless values - value = HCubature.hcubature(uintegrand, zero(FP), one(FP); rule.kwargs...)[1] + value = HCubature.hcubature(uintegrand, zeros(FP, 1), ones(FP, 1); rule.kwargs...)[1] # Reapply units return value .* integrandunits diff --git a/src/specializations/Ray.jl b/src/specializations/Ray.jl index 15686b07..fce24530 100644 --- a/src/specializations/Ray.jl +++ b/src/specializations/Ray.jl @@ -68,12 +68,12 @@ function integral( # HCubature doesn't support functions that output Unitful Quantity types # Establish the units that are output by f - testpoint_parametriccoord = zero(FP) + testpoint_parametriccoord = zeros(FP, 1) integrandunits = Unitful.unit.(integrand(testpoint_parametriccoord)) # Create a wrapper that returns only the value component in those units uintegrand(uv) = Unitful.ustrip.(integrandunits, integrand(uv)) # Integrate only the unitless values - value = HCubature.hcubature(uintegrand, zero(FP), one(FP); rule.kwargs...)[1] + value = HCubature.hcubature(uintegrand, zeros(FP, 1), ones(FP, 1); rule.kwargs...)[1] # Reapply units return value .* integrandunits