Skip to content

Commit 0e5bc0c

Browse files
committed
fix typos
1 parent 0a3ab8d commit 0e5bc0c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

aaf2/misc.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def cubic_bezier_interpolate(p0, p1, p2, p3, t):
203203

204204
guess_t = t_mix
205205

206-
# approxmate the correct t value,
206+
# approximate the correct t value,
207207
# not sure if this correct
208208
# its slow but seems to work..
209209
for i in range(20):
@@ -230,15 +230,15 @@ def sign_no_zero(v):
230230
return -1
231231
return 1
232232

233-
def calculate_tanget(p0, p1, p2, in_tanget=False):
233+
def calculate_tangent(p0, p1, p2, in_tangent=False):
234234

235235
# Note:
236236
# This code was a lot of guess work
237237
# MC docs refer to spline as "Natural Spline" or "Cardinal Spline"
238238
# and AAF files export it with CubicInterpolator definition
239-
# MC has some wacky way of calculating the y coord of tangets
239+
# MC has some wacky way of calculating the y coord of tangents
240240

241-
# in_tanget <---- x ----> out_tanget
241+
# in_tangent <---- x ----> out_tangent
242242

243243
x = p1[0]
244244
y = p1[1]
@@ -249,7 +249,7 @@ def calculate_tanget(p0, p1, p2, in_tanget=False):
249249
py = p0[1]
250250
ny = p2[1]
251251

252-
if in_tanget:
252+
if in_tangent:
253253
tan_x = 0.4 * (x - px)
254254
else:
255255
tan_x = 0.4 * (nx - x)
@@ -270,16 +270,16 @@ def calculate_tanget(p0, p1, p2, in_tanget=False):
270270
scale = min(h1, h2) / height * 2.0
271271
tan_y = scale * slope * tan_x
272272

273-
if in_tanget:
273+
if in_tangent:
274274
tan_x *= -1.0
275275
tan_y *= -1.0
276276

277277
return (tan_x, tan_y)
278278

279279
def cubic_interpolate(p0, p1, p2, p3, t):
280280

281-
tan_x0, tan_y0 = calculate_tanget(p0, p1, p2, False)
282-
tan_x1, tan_y1 = calculate_tanget(p1, p2, p3, True)
281+
tan_x0, tan_y0 = calculate_tangent(p0, p1, p2, False)
282+
tan_x1, tan_y1 = calculate_tangent(p1, p2, p3, True)
283283

284284
p0 = p1
285285
p3 = p2
@@ -347,7 +347,7 @@ def generate_offset_map(speed_map, start=0, end=None):
347347

348348
center_offset = value[offset_index]
349349

350-
# not really sure what this base fream offset is about
350+
# not really sure what this base frame offset is about
351351
# but appears to contain the how much calculation is off...
352352
center_offset -= first.base_frame
353353

@@ -451,13 +451,13 @@ def value_at(self, t):
451451
t3 = float(p2.time)
452452
v3 = float(p2.value)
453453

454-
tangets = p1.tangets[1]
455-
t1 = t0 + tangets[0]
456-
v1 = v0 + tangets[1]
454+
tangents = p1.tangents[1]
455+
t1 = t0 + tangents[0]
456+
v1 = v0 + tangents[1]
457457

458-
tangets = p2.tangets[0]
459-
t2 = t3 + tangets[0]
460-
v2 = v3 + tangets[1]
458+
tangents = p2.tangents[0]
459+
t2 = t3 + tangents[0]
460+
v2 = v3 + tangents[1]
461461

462462
return cubic_bezier_interpolate((t0, v0),
463463
(t1, v1),
@@ -552,7 +552,7 @@ def base_frame(self):
552552
return self.point_properties.get("PP_BASE_FRAME_U", 0)
553553

554554
@property
555-
def tangets(self):
555+
def tangents(self):
556556
props = self.point_properties
557557
return [(float(props.get("PP_IN_TANGENT_POS_U", 0)),
558558
float(props.get("PP_IN_TANGENT_VAL_U", 0))),

0 commit comments

Comments
 (0)