0.0.1 • Published 5 years ago

sp-calc v0.0.1

Weekly downloads
7
License
ISC
Repository
-
Last release
5 years ago

Build Status

Simplified Calculations

Simplified Calculations is an npm package tool that performs simple calculations.

Installation

$ npm i sp-calc --save

Use Case for getDistance

getDistance.fromTwoPoint(origin, destination)

This function returns the distance between two places when the geometry location are provided You can find an example of getDistance.fromTwoPoint(origin, destination) below

const spCalc = require('sp-calc')
const origin = { lat: 30.2705673, lng: -97.7413933 }
const destination = { lat: 10.2705673, lng: -97.7413933 }
const getDistance = spCalc.getDistance.fromTwoPoint(origin, destination)
console.log('distance between 2 point', getDistance)

Use Case for getRadius

getRadius.provideCircumference(circumference)

This function returns the radius of a circle with the provision of circumference You can find an example of getRadius.provideCircumference(circumference) below

const spCalc = require('sp-calc')
const circumference = 15
const getRadius = spCalc.getRadius.provideCircumference(circumference)
console.log(`this is the radius ${getRadius}`)
getRadius.provideDiameter(diameter)

This function returns the radius of a circle with the provision of diameter You can find an example of getRadius.pprovideDiameter(diameter) below

const spCalc = require('sp-calc')
const diameter = 4
const getRadius = spCalc.getRadius.provideDiameter(diameter)
console.log(`Diameter radius ${getRadius}`)

License

ISC

0.0.1

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago