@@ -39,7 +39,7 @@ const volCube = (length) => {
39
39
const volCone = ( radius , height ) => {
40
40
isNumber ( radius , 'Radius' )
41
41
isNumber ( height , 'Height' )
42
- return ( Math . PI * radius ** 2 * height / 3 )
42
+ return ( Math . PI * radius ** 2 * height / 3.0 )
43
43
}
44
44
45
45
/*
@@ -50,7 +50,7 @@ const volPyramid = (baseLength, baseWidth, height) => {
50
50
isNumber ( baseLength , 'BaseLength' )
51
51
isNumber ( baseWidth , 'BaseWidth' )
52
52
isNumber ( height , 'Height' )
53
- return ( baseLength * baseWidth * height ) / 3
53
+ return ( baseLength * baseWidth * height ) / 3.0
54
54
}
55
55
56
56
/*
@@ -91,7 +91,7 @@ const volPentagonalPrism = (pentagonalLength, pentagonalBaseLength, height) => {
91
91
*/
92
92
const volSphere = ( radius ) => {
93
93
isNumber ( radius , 'Radius' )
94
- return ( 4 / 3 * PI * radius ** 3 )
94
+ return ( 4 / 3 * Math . PI * radius ** 3 )
95
95
}
96
96
97
97
/*
@@ -100,7 +100,7 @@ const volSphere = (radius) => {
100
100
*/
101
101
const volHemisphere = ( radius ) => {
102
102
isNumber ( radius , 'Radius' )
103
- return ( 2 * PI * radius ** 3 ) / 3
103
+ return ( 2.0 * Math . PI * radius ** 3 ) / 3.0
104
104
}
105
105
106
106
const isNumber = ( number , noName = 'number' ) => {
0 commit comments