(B, A)
Reflect blade A in blade B.
Reflect blade A in blade B.
Reflect blade A in blade B .
def refl(B, A):
    "Reflect blade A in blade B."
    j = B.is_blade()
    k = A.is_blade()
    if j > -1 and k > -1:
        result = (-1)**(j * (k + 1)) * B * A * inv(B)
        result.trigsimp()
        return result
    else:
        raise ValueError('Can only reflect blades')
def refl ( B , A ) : j = B . is_blade ( ) k = A . is_blade ( ) if j > - 1 and k > - 1 : result = ( - 1 ) ** ( j * ( k + 1 ) ) * B * A * inv ( B ) result . trigsimp ( ) return result else : raise ValueError ( 'Can only reflect blades' )