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

Function areaTriangle

Maths/Area.js:68–72  ·  view source on GitHub ↗
(base, height)

Source from the content-addressed store, hash-verified

66 * @example areaTriangle(1.66, 3.44) = 2.8552
67 */
68const areaTriangle = (base, height) => {
69 validateNumericParam(base, 'Base')
70 validateNumericParam(height, 'Height')
71 return (base * height) / 2.0
72}
73
74/**
75 * @function areaTriangleWithAllThreeSides

Callers

nothing calls this directly

Calls 1

validateNumericParamFunction · 0.85

Tested by

no test coverage detected