import math


def unitvec(u):
    """
    Given a vector u, return the unit vector
    """
    modulus = math.sqrt((u[0]*u[0])+(u[1]*u[1])+(u[2]*u[2]))
    return([u[0]/modulus, u[1]/modulus, u[2]/modulus])