Protool/phipsi.py
def angle(vector1,vector2,refvector):
    """This function returns the angle between vector1 and vector2
     By using refvector, the rotation is determined to be positive (counter-clockwise)
    # or negative (clockwise)"""
    dot=Numeric.dot(vector1,vector2)
    dot=dot/(length(vector1)*length(vector2))
    vectorprod=length(cross(vector1,vector2))/(length(vector1)*length(vector2))
    ang=dr*angleFromSineAndCosine(vectorprod,dot)
    if Numeric.dot(cross(vector1,vector2),refvector)<0.0:
        ang=-ang
    return ang
This function returns the angle between vector1 and vector2
     By using refvector, the rotation is determined to be positive (counter-clockwise)
    # or negative (clockwise)
This function returns the angle between vector1 and vector2
By using refvector, the rotation is determined to be positive (counter-clockwise)
or negative (clockwise)
This function returns the angle between vector1 and vector2 By using refvector the rotation is determined to be positive ( counter - clockwise ) or negative ( clockwise )
def angle(vector1,vector2,refvector):
    dot=Numeric.dot(vector1,vector2)
    dot=dot/(length(vector1)*length(vector2))
    vectorprod=length(cross(vector1,vector2))/(length(vector1)*length(vector2))
    ang=dr*angleFromSineAndCosine(vectorprod,dot)
    if Numeric.dot(cross(vector1,vector2),refvector)<0.0:
        ang=-ang
    return ang
def angle ( vector1 , vector2 , refvector ) : dot = Numeric . dot ( vector1 , vector2 ) dot = dot / ( length ( vector1 ) * length ( vector2 ) ) vectorprod = length ( cross ( vector1 , vector2 ) ) / ( length ( vector1 ) * length ( vector2 ) ) ang = dr * angleFromSineAndCosine ( vectorprod , dot ) if Numeric . dot ( cross ( vector1 , vector2 ) , refvector ) < 0.0 : ang = - ang return ang
This function returns the angle between vector1 and vector2
By using refvector, the rotation is determined to be positive (counter-clockwise)
 or negative (clockwise)
This function returns the angle between vector1 and vector2 By using refvector the rotation is determined to be positive ( counter - clockwise ) or negative ( clockwise )
"""This function returns the angle between vector1 and vector2
     By using refvector, the rotation is determined to be positive (counter-clockwise)
    # or negative (clockwise)"""
vector1
vector2
refvector