/Aspect-Ratio-Tools

Extensive NPM toolkit to help with calculations behind image & display aspect ratios.

Primary LanguageTypeScript

Aspect Ratio Tools

Currently the most extensive set of tools for working with aspect ratio. Supports TypeScript!

Install

npm install aspect-ratio-tools --save

Quickstart

const {AR} = require('aspect-ratio-tools');
var myAR = new AR(1920,1080);
console.log(myAR.toString())

Outputs

Aspect Ratio Object: Width: 1920 Height: 1080 Aspect Ratio: 1.7777777777777777 (16:9)