Catalyzes the 1,3-allylic rearrangement of the homoallylic substrate isopentenyl (IPP) to its highly electrophilic allylic isomer, dimethylallyl diphosphate (DMAPP). . This is the function of Ensembl gene identifier ENSG00000148377 (IDI2, isopentenyl-diphosphate delta isomerase 2).