export const getRotationDegrees = ( prizeNumber , numberOfPrizes ) => { const degreesPerPrize = 360 / numberOfPrizes ; const initialRotation = 43 + degreesPerPrize / 2 ; const randomDifference = ( - 1 + Math . random ( ) * 2 ) * degreesPerPrize * 0.35 ; const prizeRotation = degreesPerPrize * ( numberOfPrizes - prizeNumber ) - initialRotation + randomDifference ; return numberOfPrizes - prizeNumber > numberOfPrizes / 2 ? - 360 + prizeRotation : prizeRotation ; } ; export const clamp = ( min , max , val ) => Math . min ( Math . max ( min , + val ) , max ) ;