Star Apparent Magnitude

Calculate a star's apparent magnitude from absolute magnitude and distance.