Convert polar coordinates to Cartesian coordinates
def cartesian(magnitude, angle) [magnitude*Math.cos(angle), magnitude*Math.sin(angle)] end