x, y, z = pos
radius = width / 2.0
if width >= 0.0:
x = -x
a = radius * math.pi
a = (x/a) * math.pi
This is a code snippet from someone other than me, and I've been wanting to understand it. However, the variable a
is a little ambiguous, and I'm having trouble figuring out its purpose.
This snippet is part of a function that calculates an arch that text will be displayed over.
The variable pos
is the position of the current letter we are working with.
The variable width
is the width of the entire line.