Releases: yetnt/ump
v6.1.0-dev.1
Full Changelog: v6.1.0-dev.0...v6.1.0-dev.1
v6.1.0-dev.0
Full Changelog: v6.0.0...v6.1.0-dev.0
v6.0.0
Important
Completely removed findN in favour of findNthTerm
Quadratic Patterns
findNthTerm
num1: The first number in the sequencenum2: The second number in the sequencenum3: The third number in the sequence
findTerm
Find a term in the sequence
n: The term numbera: Quadratic coefficient (an² + bn + c)b: Linear coefficient (an² +bn + c)c: Constant term / y-intercept (an² + bn +c)
const { QuadraticPattern } = require("@yetnt/ump");
let nthTerm = QuadraticPattern.findNthTerm(139, 184, 235);
console.log(nthTerm); // { a: 3, b: 36, c: 100, formula: '(3n^2) + (36n) + 100' }
QuadraticPattern.findTerm(20, nthTerm.a, nthTerm.b, nthTerm.c); // 2020findTerms
Returns an array of the pattern starting at term n and ending at term nn
n: The term to start atnn: The term to end ata: Quadratic coefficient (an² + bn + c)b: Linear coefficient (an² +bn + c)c: Constant term / y-intercept (an² + bn +c)
const { QuadraticPattern } = require("@yetnt/ump");
const a = QuadraticPattern.findTerms(1, 10, 1, 2, 7);
console.log(a); // [10, 15, 22, 31, 42, 55, 70, 87, 106, 127]Full Changelog: v5.2.0...v6.0.0
v6.0.0-beta
Important
Completely removed findN in favour of findNthTerm
Quadratic Patterns
(will put the docs here when released)
Full Changelog: v5.2.0...v6.0.0-beta
v5.2.0 Deprecated
findN has been deprecatedfor both #GeometricPattern and #LinearPattern
Full Changelog: v5.1.0...v5.2.0
Move to TS + `calculate()`
5.0.0 Depracted and new
ConvUnit and ConvTemp are no longer in use. See version 4.2.0 for new use
All functions have been changed from PascalCase to camelCase
Old
PropRatio()Convert.Distance()New
propRatio()Convert.distance()New functions
gcd() Greatest Common Divisor (Highest Common Factor)
gcd(24, 64) // 8Patterns
Linear Patterns
const { LinearPattern } = require("@yetnt/ump")
LinearPattern.findN(10, 30, 50); // "10 + (n - 1) * 20"
LinearPattern.findTerm(3, 20, 10); // 50, (find the 3rd term in the sequence. 20 is the difference and 10 is the first number in the sequence)Geometric Pattern
const { GeometricPattern } = require("@yetnt/ump");
GeometricPattern.findN(1, 4, 16); // "1 * 4**(n - 1)"
GeometricPattern.findTerm(3, 1, 4); // 16, 3 is the term number, 1 is the first term and 4 is the constant ratio.Statistics
Mean
const { Stats } = require("@yetnt/ump");
Stats.mean([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); // 3.9Median
const { Stats } = require("@yetnt/ump");
Stats.median([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); //2.5Mode
const { Stats } = require("@yetnt/ump");
Stats.mode([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); // [ 1 ]Range
const { Stats } = require("@yetnt/ump");
Stats.range([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); // 7Sum
const { Stats } = require("@yetnt/ump");
Stats.sum([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); // 39Full Changelog: 4.1.1...v5.0.0
4.2.0 (Deprecated and new function)
Function ConvUnit and ConvTemp are now marked as depracted. Use (below)
Old
const { ConvUnit } = require("@yetnt/ump")
ConvUnit("dist", 56, "mm", "cm")New
const { Convert } = require("@yetnt/ump")
Convert.Distance(56, "mm", "cm")This also applies to Area and Volume
Old functions ConvTemp and ConvUnit are still available for use but will be removed in the next major release.
New function Convert.Data
Used to convert data values between one another.
const { Convert } = require("@yetnt/ump")
Convert.Data(45, "kilobyte", "megabyte")Data Enum
Data Enum was also added and is encouraged to be used
const { Data } = require("@yetnt/ump")
Data.Kilobyte
Data.MegabyteFull Changelog: v4.1.2...v4.2.0
4.1.2
Documentation for #ConvTemp
Full Changelog: v4.1.1...v4.1.2
4.1.1
Moved functions to separate folders and added tests for #ConvUnit
Full Changelog: v4.1.0...v4.1.1