algorithm class: cone (#1253)

This commit is contained in:
Gustavo Kamihara
2022-10-31 13:01:20 -03:00
committed by GitHub
parent c5101e3e2b
commit f1ef64cc2d
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import Cone from '../Cone'
const cone = new Cone(3, 5)
test('The Volume of a cone with base radius equal to 3 and height equal to 5', () => {
expect(parseFloat(cone.volume().toFixed(2))).toEqual(47.12)
})
test('The Surface Area of a cone with base radius equal to 3 and height equal to 5', () => {
expect(parseFloat(cone.surfaceArea().toFixed(2))).toEqual(83.23)
})