New answers tagged


You need to remove the toFixed(0) function at the end of the var X and Y, or at least you have to set a much greater argument such as 6 or 8. This method "converts a number into a string, keeping a specified number of decimals" so the number of decimal set as argument will determine the accuracy of your values.

Top 50 recent answers are included