1.0.2 • Published 7 years ago

focal-length v1.0.2

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

Focal Length

A simple NPM module for calculating the effective focal length given crop factor of camera and focal length of a lens.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

This project uses jest for testing:

npm i --save jest

Installing

npm i --save focal-length

Running the tests

This system uses Jest for testing.

Installing Jest

To install Jest, run

npm install jest

We only have one test, which verifies that calcNewFocalLength is returning the correct value and type of value. To run this test, type:

Implementing Tests

npm test

Deployment

To calculate the effective focal length for a crop factor and focal length:

const focalLength = require('focal-length');
const cropFactor = YOUR_CROP_FACTOR;
const focalLength = YOUR_FOCAL_LENGTH;

focalLength.calcNewFocalLength(cropFactor, focalLength);

Authors

  • Delia Stephens - Initial work -

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago