Distance in CM From Px

With PixelRatio or else, how could we calculate distance in cm with PanResponder in onPanResponderMove ?

i juste try in onPanResponderMove

            const {moveX, moveY, dx, dy} = gesture;
            const distPxl =  Math.sqrt((dx * dx) + (dy * dy))
            const distCm = (distPxl * 2.54) / (160 * PixelRatio.get())

but it’s not working

thx

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.