From 18d68e86a306564d83382c4306860463a879afe5 Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Sat, 3 Feb 2018 20:06:39 +0000 Subject: [PATCH] NodeJS: replace with Math.PI instead of 3.14 --- backend/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/node.js b/backend/node.js index 35e8c4f..cdf5cd1 100644 --- a/backend/node.js +++ b/backend/node.js @@ -84,7 +84,7 @@ module.parent; // The module that required this one. module.children; // The module objects required by this one. exports.area = function (r) { - return 3.14 * r * r; + return Math.PI * r * r; }; // If you want the root of your module's export to be a function (such as a constructor)