@ilihub/cube
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@ilihub/cube

A collection of useful TypeScript functions for cube related operations.

NPM Version NPM CodeFactor Socket Badge

Installation

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

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

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

Usage

import { Cube } from "@ilihub/cube";

const sideLength = 5;

const cube = new Cube(sideLength);

const diagonal = cube.diagonal();
console.log(diagonal); // 8.660254037844386

const lateralSurfaceArea = cube.lateralSurfaceArea();
console.log(lateralSurfaceArea); // 100

const totalSurfaceArea = cube.totalSurfaceArea();
console.log(totalSurfaceArea); // 150

const volume = cube.volume();
console.log(volume); // 125

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


Package Sidebar

Install

npm i @ilihub/cube

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

7.45 kB

Total Files

5

Last publish

Collaborators

  • harshraj8843