https://github.com/colinmcneil/aspect-ratio-tools
Extensive NPM toolkit to help with calculations behind image & display aspect ratios.
https://github.com/colinmcneil/aspect-ratio-tools
aspect-ratio node-module nodejs
Last synced: about 2 months ago
JSON representation
Extensive NPM toolkit to help with calculations behind image & display aspect ratios.
- Host: GitHub
- URL: https://github.com/colinmcneil/aspect-ratio-tools
- Owner: ColinMcNeil
- Created: 2017-05-11T14:05:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T23:20:44.000Z (about 9 years ago)
- Last Synced: 2025-02-03T11:31:56.221Z (over 1 year ago)
- Topics: aspect-ratio, node-module, nodejs
- Language: TypeScript
- Homepage:
- Size: 1.45 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Aspect Ratio Tools**
=====
Currently the most extensive set of tools for working with aspect ratio. Supports TypeScript!
### [Documentation](http://aspect-ratio-tools.readthedocs.io/en/latest/?) ###
## Install ##
`npm install aspect-ratio-tools --save`
## Quickstart ##
```javascript
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)