Fixed divisions per 0 in from_cartesian()