import math


def dist(cosv,sinv,cordv):
    """Intermidiate scalar value for calculating sinus and cosinus of vectors
    Parameter
    ---------
    cosv, sinv  :   The vectors returned from pairCS(num)
    cordv       :   Vector to operate on. All inputs must have same length
                    and is expected to be "flat" (horisontal) numpy ndarrays
    
    Returns
    -------
    Scalar value to assist in other calculations"""
    return math.sqrt((cosv @ cordv.reshape(-1,1))**2+(sinv @ cordv.reshape(-1,1))**2)