an equation that uses the difference between the apparent magnitude and absolute magnitude of a star to measure its distance