Skip to content

Commit ee5bdae

Browse files
committed
Remove explicit FP conversion
1 parent 5eb6bfb commit ee5bdae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/specializations/BezierCurve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ function integral(
4343
xs, ws = _gausslegendre(FP, rule.n)
4444

4545
# Change of variables: x [-1,1] ↦ t [0,1]
46-
t(x) = FP(1 // 2) * x + FP(1 // 2)
46+
t(x) = (1 // 2) * x + (1 // 2)
4747
point(x) = curve(t(x), alg)
4848
integrand(x) = f(point(x)) * differential(curve, (t(x),), diff_method)
4949

5050
# Integrate f along curve and apply domain-correction for [-1,1] ↦ [0, length]
51-
return FP(1 // 2) * sum(w .* integrand(x) for (w, x) in zip(ws, xs))
51+
return (1 // 2) * sum(w .* integrand(x) for (w, x) in zip(ws, xs))
5252
end
5353

5454
function integral(

0 commit comments

Comments
 (0)