peng3d/model.py
def v_magnitude(v):
    """
    Simple vector helper function returning the length of a vector.
    
    ``v`` may be any vector, with any number of dimensions
    """
    return math.sqrt(sum(v[i]*v[i] for i in range(len(v))))
def v_magnitude(v):
    """
    Simple vector helper function returning the length of a vector.
    
    ``v`` may be any vector, with any number of dimensions
    """
    return math.sqrt(sum(v[i]*v[i] for i in range(len(v))))
Simple vector helper function returning the length of a vector.
    
    ``v`` may be any vector, with any number of dimensions