Package Exports
- @yetnt/ump
- @yetnt/ump/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@yetnt/ump) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Useless Math Package
I mean.. Do you really need this soon to be multi mathemetically functioning package? (if that even makes sense)
Installation
npm i @yetnt/umpIt's suggested you don't install from github itself as I'm consistently commiting to the project you'll need to update everyday and because some code breaks because i'm editing it so just get it from npm 👍
const Ump = require('@yetnt/ump')Features
So far this package can do a lot
Prime Factorization
const Ump = require('@yetnt/ump')
Ump.PrimeFactorize(50) // [2, 5, 5]
Ump.PrimeFactorize(5000) // [2, 2, 2, 5, 5, 5, 5]
Ump.PrimeFactorize(93928893) // [3, 17, 103, 17881]
Ump.PrimeFactorize(3) // [3]Ratio(s)
Divide x in the ratio of y:z
const Ump = require('@yetnt/ump')
Ump.DinRatio(500, 3, 2) // [300, 200]
Ump.DinRatio(456.93, 12, 5) // [ 322.5388235294118, 134.39117647058825 ]
Ump.DinRatio(456.93, 12, 5, true) // ['322.56', '134.4']Direct Proportion (equivalent ratios)
const Ump = require('@yetnt/ump')
Ump.PropRatio(2, 4, 6, true) // 12
/*
x : y
z : ?
*/
Ump.PropRatio(2, 6, 12) // 4
/*
x : y
? : z
*/Conversion
Distance
const Ump = require('@yetnt/ump')
Ump.ConvUnit("dist", 12, "millimetre", "centimetre") // 1.2
Ump.ConvUnit("dist", 1, "inch", "cm") // 2.54
Ump.convUnit("dist", 98, "nautical-mile", "nanometre") // 1852000000000Area
const Ump = require('@yetnt/ump')
Ump.ConvUnit("area", 34, "square-centimetre", "square-inch") // 5.27001054002108
Ump.ConvUnit("area", 34, "cm2", "inch2") // 5.27001054002108
Ump.ConvUnit("area", 490, "hectare", "ft2") // 52743183.75079384Volume
const Ump = require('@yetnt/ump')
Ump.ConvUnit("vol", 34, "cubic-centimetre", "cubic-inch") // 2.0748027411805627
Ump.ConvUnit("vol", 34, "cm3", "inch3") // 2.0748027411805627
Ump.ConvUnit("vol", 490, "quart", "litre") // 463.71297Distance/Area/Volume definitons
Releases
Links
Places you can find this package
Contributors
Main/Owner/Creator of package
others
- 202291
- Improved PrimeFactorize, by removing feature that does not work.