From d7626e3b63308ef93125b5af4e732aa53b96b90b Mon Sep 17 00:00:00 2001 From: leeyan44 <86589062+leeyan44@users.noreply.github.com> Date: Mon, 19 Jul 2021 22:44:12 +0800 Subject: [PATCH] Update Volume.js --- Maths/Volume.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Maths/Volume.js b/Maths/Volume.js index ae65925a3..c05117358 100644 --- a/Maths/Volume.js +++ b/Maths/Volume.js @@ -39,7 +39,7 @@ const volCube = (length) => { const volCone = (radius, height) => { isNumber(radius, 'Radius') isNumber(height, 'Height') - return (Math.PI * radius ** 2 * height/3) + return (Math.PI * radius ** 2 * height/3.0) } /* @@ -50,7 +50,7 @@ const volPyramid = (baseLength, baseWidth, height) => { isNumber(baseLength, 'BaseLength') isNumber(baseWidth, 'BaseWidth') isNumber(height, 'Height') - return (baseLength * baseWidth * height) / 3 + return (baseLength * baseWidth * height) / 3.0 } /* @@ -91,7 +91,7 @@ const volPentagonalPrism = (pentagonalLength, pentagonalBaseLength, height) => { */ const volSphere = (radius) => { isNumber(radius, 'Radius') - return (4/3 * PI * radius ** 3) + return (4/3 * Math.PI * radius ** 3) } /* @@ -100,7 +100,7 @@ const volSphere = (radius) => { */ const volHemisphere = (radius) => { isNumber(radius, 'Radius') - return (2 * PI * radius ** 3)/3 + return (2.0 * Math.PI * radius ** 3)/ 3.0 } const isNumber = (number, noName = 'number') => {