Angular correlations between heavy quarks provide a unique probe of the quark-gluon plasma created in ultrarelativistic heavy-ion collisions. Results are presented of a measurement of the azimuthal angle correlations between muons originating from semileptonic decays of heavy quarks produced in 5.02 TeV Pb+Pb and πβ’π collisions at the LHC. The muons are measured with transverse momenta and pseudorapidities satisfying ππ
T>4ββGeV and |ππ|<2.4, respectively. The distributions of azimuthal angle separation Ξβ’π for muon pairs having pseudorapidity separation |Ξβ’π|>0.8, are measured in different Pb+Pb centrality intervals and compared to the same distribution measured in πβ’π collisions at the same center-of-mass energy. Results are presented separately for muon pairs with opposite-sign charges, same-sign charges, and all pairs. A clear peak is observed in all Ξβ’π distributions at Ξβ’πβΌπ, consistent with the parent heavy-quark pairs being produced via hard-scattering processes. The widths of that peak, characterized using Cauchy-Lorentz fits to the Ξβ’π distributions, are found to not vary significantly as a function of Pb+Pb collision centrality and are similar for πβ’π and Pb+Pb collisions. This observation will provide important constraints on theoretical descriptions of heavy-quark interactions with the quark-gluon plasma.