1.0.4 • Published 2 years ago

@ilihub/right-triangle v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@ilihub/right-triangle

A collection of useful TypeScript functions and utilities for performing calculations on right triangle.

NPM Version NPM CodeFactor Socket Badge

Installation

# if you're using pnpm
pnpm add @ilihub/right-triangle

# or, if you're using npm
npm install @ilihub/right-triangle

# or, if you're using yarn
yarn add @ilihub/right-triangle

Usage

import { RightTriangle } from "@ilihub/right-triangle";

const base = 6;
const height = 5;

const rightTriangle = new RightTriangle(base, height);

const area = rightTriangle.area();
console.log(area); // 15

const perimeter = rightTriangle.perimeter();
console.log(perimeter); // 18.810249675906654

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