INNER CODE UNIT · Python

angle

Is-Daouda/is-Engine · libs/freetype/src/tools/cordic.py:17

    angle  = math.atan(x)           # arctangent
    angle2 = round(angle*scale)     # arctangent in FT_Angle units

    if angle2 <= 0:
        break

    sys.stdout.write( comma + repr( int(angle2) ) )
    comma = ", "

    shrink /= math.sqrt( 1 + x*x )

print
print "shrink factor    = " + repr( shrink )
print "shrink factor 2  = " + repr( int( shrink * (2**32) ) )
print "expansion factor = " + repr( 1/shrink )
print ""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…