mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-19 16:53:15 +00:00
NodeJS: replace with Math.PI instead of 3.14
This commit is contained in:
parent
a4e4b2fff5
commit
18d68e86a3
@ -84,7 +84,7 @@ module.parent; // The module that required this one.
|
|||||||
module.children; // The module objects required by this one.
|
module.children; // The module objects required by this one.
|
||||||
|
|
||||||
exports.area = function (r) {
|
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)
|
// If you want the root of your module's export to be a function (such as a constructor)
|
||||||
|
Loading…
Reference in New Issue
Block a user