Skip to content

Releases: YetNT/ump

v6.0.0

09 Mar 10:43
Compare
Choose a tag to compare

Important

Completely removed findN in favour of findNthTerm

Quadratic Patterns

findNthTerm

  • num1: The first number in the sequence
  • num2: The second number in the sequence
  • num3: The third number in the sequence

findTerm

Find a term in the sequence

  • n: The term number
  • a: 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); // 2020

findTerms

Returns an array of the pattern starting at term n and ending at term nn

  • n: The term to start at
  • nn: The term to end at
  • a: 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

09 Mar 08:52
Compare
Choose a tag to compare
v6.0.0-beta Pre-release
Pre-release

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

04 Nov 15:51
Compare
Choose a tag to compare

findN has been deprecatedfor both #GeometricPattern and #LinearPattern

Full Changelog: v5.1.0...v5.2.0

Move to TS + `calculate()`

21 Oct 06:36
Compare
Choose a tag to compare

JS -> TS

calculate

calculate math equations

calculate("2+2^(9/5)")

Full Changelog: v5.0.0...v5.1.0

5.0.0 Depracted and new

14 Jun 18:24
Compare
Choose a tag to compare

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) // 8

Patterns

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.9

Median

const { Stats } = require("@yetnt/ump");

Stats.median([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); //2.5

Mode

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]); // 7

Sum

const { Stats } = require("@yetnt/ump");

Stats.sum([1, 1, 2, 6, 7, 8, 3, 5, 5, 1]); // 39

Full Changelog: 4.1.1...v5.0.0

4.2.0 (Deprecated and new function)

14 Jun 08:31
Compare
Choose a tag to compare

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.Megabyte

Full Changelog: v4.1.2...v4.2.0

4.1.2

10 Jun 09:01
Compare
Choose a tag to compare

Documentation for #ConvTemp

Full Changelog: v4.1.1...v4.1.2

4.1.1

10 Jun 08:27
Compare
Choose a tag to compare

Moved functions to separate folders and added tests for #ConvUnit

Full Changelog: v4.1.0...v4.1.1

v4.1.0

08 Jun 20:01
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.0.0...v4.1.0

v4.0.0 Added Enums for distance (not on NPM yet)

04 Jun 16:40
Compare
Choose a tag to compare

Changelog

all that was added was the Area, Distance and Volume.

Usage (using Distance)

const { ConvUnit, Distance } = require('@yetnt/ump')

ConvUnit("dist", 12, Distance.Millimeter, Distance.Centimeter) // 1.2
ConvUnit("dist", 1, Distance.Inch, Distance.Centimeter) // 2.54
ConvUnit("dist", 98, Distance.NauticalMile, Distance.Nanometer) // 1852000000000

Full Changelog: v3.2.1...v4.0.0

Full Changelog: v3.2.1...v4.0.0