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

Function volPyramid

Maths/Volume.js:53–58  ·  view source on GitHub ↗
(baseLength, baseWidth, height)

Source from the content-addressed store, hash-verified

51 return (baseLength * baseWidth * height) / 3
52*/
53const volPyramid = (baseLength, baseWidth, height) => {
54 isNumber(baseLength, 'BaseLength')
55 isNumber(baseWidth, 'BaseWidth')
56 isNumber(height, 'Height')
57 return (baseLength * baseWidth * height) / 3.0
58}
59
60/*
61 Calculate the volume for a Cylinder

Callers

nothing calls this directly

Calls 1

isNumberFunction · 0.85

Tested by

no test coverage detected