DEV Community

Discussion on: Real Compass on mobile browsers with Javascript

Collapse
 
muzairs15 profile image
MUzairS15

Can someone help me understand this code, why are we calculating pointdegree and all, we can do only with e.webkitcompassheading (this will give the required movement from north position ) isn't it??
And also we are transforming compass with value of 'compass' so what purpose does other functions serve??