get sign of result
sign = ( dy < 0 ) ^ ( dx < 0 ) NEW_LINE if ( sign ) : NEW_LINE INDENT return ( - abs ( dy ) // g , abs ( dx ) // g ) NEW_LINE DEDENT else : NEW_LINE INDENT return ( abs ( dy ) // g , abs ( dx ) // g ) NEW_LINE DEDENT