mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-22 00:07:10 +02:00
the stated Bezier function missed the last iteration
reported in https://pomax.github.io/bezierinfo/#comment-3140904916
This commit is contained in:
@@ -243,7 +243,7 @@ binomial(n,k):
|
|||||||
|
|
||||||
<pre>function Bezier(n,t):
|
<pre>function Bezier(n,t):
|
||||||
sum = 0
|
sum = 0
|
||||||
for(k=0; k<n; k++):
|
for(k=0; k<=n; k++):
|
||||||
sum += binomial(n,k) * (1-t)^(n-k) * t^(k)
|
sum += binomial(n,k) * (1-t)^(n-k) * t^(k)
|
||||||
return sum</pre>
|
return sum</pre>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user