UNPKG

@yetnt/ump

Version:

A very useless math package for your complex javascript projects

46 lines (45 loc) 1.06 kB
/** * f1 : 2a = T1 * f2 : 3a+b = T1 * f3 : a+b+c = T1 * * final : an^2+bn+c */ /** * Returns singular term. * @param n The term number (not zero indexed) * @param a `a`n^2+bn+c * @param b an^2+`b`n+c * @param c an^2+bn+`c` */ declare function findTerm(n: number, a: number, b: number, c: number): number; /** * Returns multiple terms * @param n The term number to start at (not zero indexed) * @param nn The term number to end at * @param a `a`n^2+bn+c * @param b an^2+`b`n+c * @param c an^2+bn+`c` */ declare function findTerms(n: number, nn: number, a: number, b: number, c: number): number[]; /** * * @param num1 The first number * @param num2 The second number * @param num3 The third number */ declare function findNthTerm(num1: number, num2: number, num3: number): { a: number; b: number; c: number; formula: string; }; /** * Quadratic pattern functions */ declare const _default: { findTerm: typeof findTerm; findNthTerm: typeof findNthTerm; findTerms: typeof findTerms; }; export default _default;