variables - What is this formula involving circles trying to do? -


x, y, z = pos radius = width / 2.0 if width >= 0.0:     x = -x = radius * math.pi = (x/a) * math.pi 

this code snippet other me, , i've been wanting understand it. however, variable a little ambiguous, , i'm having trouble figuring out purpose.

this snippet part of function calculates arch text displayed over.

the variable pos position of current letter working with. variable width width of entire line.

there nonsense usage of math.pi - result doesn't depend on it.
a = x/r = cos(fi), fi direction angle of (coordinate origin - starting point) vector, if r radius of arc origin center

(cos(fi) negated positive width values)


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -