1414
1515/*
1616 Calculate the volume for a Cuboid
17+ Reference: https://www.cuemath.com/measurement/volume-of-cuboid/
1718 return width * length * height
1819*/
1920const volCuboid = ( width , length , height ) => {
@@ -25,6 +26,7 @@ const volCuboid = (width, length, height) => {
2526
2627/*
2728 Calculate the volume for a Cube
29+ Reference: https://www.cuemath.com/measurement/volume-of-cube/
2830 return length * length * length
2931*/
3032const volCube = ( length ) => {
@@ -34,6 +36,7 @@ const volCube = (length) => {
3436
3537/*
3638 Calculate the volume for a Cone
39+ Reference: https://www.cuemath.com/measurement/volume-of-cone/
3740 return PI * radius^2 * height/3
3841*/
3942const volCone = ( radius , height ) => {
@@ -44,6 +47,7 @@ const volCone = (radius, height) => {
4447
4548/*
4649 Calculate the volume for a Pyramid
50+ Reference: https://www.cuemath.com/measurement/volume-of-pyramid/
4751 return (baseLength * baseWidth * height) / 3
4852*/
4953const volPyramid = ( baseLength , baseWidth , height ) => {
@@ -55,6 +59,7 @@ const volPyramid = (baseLength, baseWidth, height) => {
5559
5660/*
5761 Calculate the volume for a Cylinder
62+ Reference: https://www.cuemath.com/measurement/volume-of-cylinder/
5863 return PI * radius^2 * height
5964*/
6065const volCylinder = ( radius , height ) => {
@@ -65,6 +70,7 @@ const volCylinder = (radius, height) => {
6570
6671/*
6772 Calculate the volume for a Triangular Prism
73+ Reference: http://lrd.kangan.edu.au/numbers/content/03_volume/04_page.htm
6874 return 1 / 2 * baseLengthTriangle * heightTriangle * height
6975*/
7076const volTriangularPrism = ( baseLengthTriangle , heightTriangle , height ) => {
@@ -76,6 +82,7 @@ const volTriangularPrism = (baseLengthTriangle, heightTriangle, height) => {
7682
7783/*
7884 Calculate the volume for a Pentagonal Prism
85+ Reference: https://www.cuemath.com/measurement/volume-of-pentagonal-prism/
7986 return 5/2 * pentagonalLength * pentagonalBaseLength * height
8087*/
8188const volPentagonalPrism = ( pentagonalLength , pentagonalBaseLength , height ) => {
@@ -87,6 +94,7 @@ const volPentagonalPrism = (pentagonalLength, pentagonalBaseLength, height) => {
8794
8895/*
8996 Calculate the volume for a Sphere
97+ Reference: https://www.cuemath.com/measurement/volume-of-sphere/
9098 return 4/3 * PI * radius^3
9199*/
92100const volSphere = ( radius ) => {
@@ -96,6 +104,7 @@ const volSphere = (radius) => {
96104
97105/*
98106 Calculate the volume for a Hemisphere
107+ Reference: https://www.cuemath.com/measurement/volume-of-hemisphere/
99108 return (2 * PI * radius^3)/3
100109*/
101110const volHemisphere = ( radius ) => {
0 commit comments