diff --git a/Maths/Area.js b/Maths/Area.js index a047b92223..0b748fd722 100644 --- a/Maths/Area.js +++ b/Maths/Area.js @@ -170,6 +170,21 @@ const validateNumericParam = (param, paramName = 'param') => { } } +/** + * @function areaRectangleAlt + * @description An alternative method to calculate the area of a rectangle. + * @param {Integer} length - Integer + * @param {Integer} width - Integer + * @return {Integer} - length * width + * @example areaRectangleAlt(4, 5) = 20 + */ +const areaRectangleAlt = (length, width) => { + validateNumericParam(length, 'Length') + validateNumericParam(width, 'Width') + return length * width +} + + export { surfaceAreaCube, surfaceAreaSphere, @@ -180,5 +195,6 @@ export { areaTrapezium, areaCircle, areaRhombus, - areaTriangleWithAllThreeSides + areaTriangleWithAllThreeSides, + areaRectangleAlt } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy