@ilihub/cube
v1.0.3
Published
A collection of useful TypeScript functions for cube related operations.
Downloads
11
Maintainers
Readme
@ilihub/cube
A collection of useful TypeScript functions for cube related operations.
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.