from math import cos, sin, pi


def laglongToCoord(theta: float, phi: float):
    """Convert lagtitude and longitude to xyz coordinate."""
    theta, phi = theta/180*pi, phi/180*pi
    return sin(theta)*cos(phi), sin(phi), cos(theta)*cos(phi)