From f1b20663bcb4c9e4e6bb80f51f1b504c32a0f9c1 Mon Sep 17 00:00:00 2001 From: Joel Salisbury Date: Thu, 21 Jan 2016 14:37:17 -0500 Subject: [PATCH] precision of num --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index bfb4aa6..998059d 100644 --- a/js/main.js +++ b/js/main.js @@ -8,6 +8,6 @@ if (window.DeviceMotionEvent) { function deviceMotionHandler(eventData) { // Grab the acceleration from the results var acceleration = eventData.acceleration; - $("#accelerationX").html(acceleration.x); + $("#accelerationX").html(acceleration.x.toPrecision(4); } \ No newline at end of file