MCPcopy Create free account
hub / github.com/TheAlgorithms/JavaScript / volPentagonalPrism

Function volPentagonalPrism

Maths/Volume.js:88–93  ·  view source on GitHub ↗
(pentagonalLength, pentagonalBaseLength, height)

Source from the content-addressed store, hash-verified

86 return 5/2 * pentagonalLength * pentagonalBaseLength * height
87*/
88const volPentagonalPrism = (pentagonalLength, pentagonalBaseLength, height) => {
89 isNumber(pentagonalLength, 'PentagonalLength')
90 isNumber(pentagonalBaseLength, 'PentagonalBaseLength')
91 isNumber(height, 'Height')
92 return (5 / 2) * pentagonalLength * pentagonalBaseLength * height
93}
94
95/*
96 Calculate the volume for a Sphere

Callers

nothing calls this directly

Calls 1

isNumberFunction · 0.85

Tested by

no test coverage detected