1.0.0 • Published 8 years ago

ppicalculator v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

PPI Calculator

ppicalculator calculates pixels per inch for a certain screen

Description

PPI is a bit more correct, but DPI is the more common term. If you are interested, you can read more in this Wikipedia Article.

Install

npm install ppicalculator

Usage

ppi(hRes, vRes, diagSize)

hRes: Horizontal resolution in Pixels

vRes: Vertical resolution in Pixels

diagSize: Diagonal size in inches

import ppi from 'ppicalculator'

ppi(1980, 1080, 13.3) // 166

Credits

Fabio Cortés

License

MIT