math-base-geometry
Version:
utils for math geometry
29 lines (27 loc) • 1.05 kB
JavaScript
function cylinder(expect, triDimensional) {
const cylinder = triDimensional.Cylinder;
describe('Cylinder', () => {
describe("Radius", () => {
context("volume=5 height=10", () => {
it("Should be 0.3989422804014327", () => {
expect(cylinder.radius(5, 10)).to.equal(0.3989422804014327)
});
});
});
// describe("Perimeter", () => {
// context("A=1 B=6 C=3", () => {
// it("Should return 10", () => {
// expect(cylinder.perimeter(1, 6, 3)).to.equal(10);
// })
// })
// });
// describe("Base", () => {
// context("area=100 side=12 gamma=45 degree", () => {
// it("Should return between 23.01, 23.99 (JS floating point problems)", () => {
// expect(cylinder.base(100, 12, 45)).to.be.closeTo(23.01, 23.99);
// })
// })
// });
});
}
module.exports = { test: cylinder };