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

Function volCylinder

Maths/Volume.js:65–69  ·  view source on GitHub ↗
(radius, height)

Source from the content-addressed store, hash-verified

63 return PI * radius^2 * height
64*/
65const volCylinder = (radius, height) => {
66 isNumber(radius, 'Radius')
67 isNumber(height, 'Height')
68 return Math.PI * radius ** 2 * height
69}
70
71/*
72 Calculate the volume for a Triangular Prism

Callers

nothing calls this directly

Calls 1

isNumberFunction · 0.85

Tested by

no test coverage detected