Skip to content

Commit d43268c

Browse files
authored
Fix typo: rename getArcLenghts to getArcLengths
1 parent 0690d19 commit d43268c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/ILL/ILL/Ass/Shape/Curve.moon

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Curve
2929
-- flattens the bezier segment
3030
flatten: (len = @getLength!, reduce = 1) =>
3131
len = math.floor len / reduce + 0.5
32-
lengths = @getArcLenghts len
32+
lengths = @getArcLengths len
3333
points = {Point @a.x, @a.y}
3434
for i = 1, len - 1
3535
insert points, @getPTatTime Curve.uniformTime lengths, len, i / len
@@ -44,7 +44,7 @@ class Curve
4444
return 0 if a.x == p.x and a.y == p.y
4545
return 1 if d.x == p.x and d.y == p.y
4646
length = @getLength!
47-
lengths = @getArcLenghts precision
47+
lengths = @getArcLengths precision
4848
for t = 0, 1, 1 / precision
4949
u = Curve.uniformTime lengths, length, t
5050
if @getPTatTime(u)\distance(p) <= tolerance
@@ -120,7 +120,7 @@ class Curve
120120
getNormalized: (t, inverse) =>
121121
t = Math.clamp t, 0, 1
122122
n = @getLength!
123-
u = Curve.uniformTime @getArcLenghts(n), n, t
123+
u = Curve.uniformTime @getArcLengths(n), n, t
124124
p = @getPTatTime u
125125
tan = @getDerivative u
126126
with tan
@@ -172,7 +172,7 @@ class Curve
172172

173173
-- Return a table containing the lenght of all the arc
174174
-- The "precision" variable can be considered the distance of the points from each other in pixel
175-
getArcLenghts: (precision = 100) =>
175+
getArcLengths: (precision = 100) =>
176176
z = 1 / precision
177177
lengths, clen = {0}, 0
178178
cx, cy = @getXatTime(0), @getYatTime(0)
@@ -205,4 +205,4 @@ class Curve
205205
@a, @b, @c, @d = d2, c2, b2, a2
206206
@a.id, @d.id = "l", "b"
207207

208-
{:Curve}
208+
{:Curve}

0 commit comments

Comments
 (0)