1.0.1 • Published 6 months ago

@ilihub/cuboid v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@ilihub/cuboid

A collection of useful TypeScript functions for cuboid related operations.

NPM Version NPM CodeFactor Socket Badge

Installation

# if you're using pnpm
pnpm add @ilihub/cuboid

# or, if you're using npm
npm install @ilihub/cuboid

# or, if you're using yarn
yarn add @ilihub/cuboid

Usage

import { Cuboid } from "@ilihub/cuboid";

const length = 10;
const width = 20;
const height = 30;

const cuboid = new Cuboid(length, width, height);

const lateralSurfaceArea = cuboid.lateralSurfaceArea();
console.log(lateralSurfaceArea); // 1800

const perimeter = cuboid.perimeter();
console.log(perimeter); // 240

const surfaceArea = cuboid.surfaceArea();
console.log(surfaceArea); // 2200

const totalSurfaceArea = cuboid.totalSurfaceArea();
console.log(totalSurfaceArea); // 2200

const volume = cuboid.volume();
console.log(volume); // 6000

Available Functions and Classes


Sponsors & Backers

Support the development of new open-source projects from ilihub through crowdfunding.

The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.

Sponsors