def get_rotation(rotation):
if rotation in ('<STR_LIT>', None):<EOL><INDENT>angle = <NUM_LIT:0.><EOL><DEDENT>elif rotation == '<STR_LIT>':<EOL><INDENT>angle = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>angle = float(rotation)<EOL><DEDENT>return angle%<NUM_LIT><EOL>
Return the text angle as float.

*rotation* may be 'horizontal', 'vertical', or a numeric value in degrees.