Used math constant for pi instead of hard-coded values.