UNPKG

@yetnt/ump

Version:

A very useless math package for your complex javascript projects

38 lines (37 loc) 1.18 kB
/** * * @param n The term number. * @param d The difference. * @param a First number in sequqnce. The formula for this is `Tn = a + (n - 1) * d`. If you prefer to use `Tn = dn+c`, then `a` is `c` */ declare function findTerm(n: number, d: number, a: number): number; /** * * @param n The first term number. * @param nn The last term number. * @param d The difference. * @param a First number in sequqnce. The formula for this is `Tn = a + (n - 1) * d`. If you prefer to use `Tn = dn+c`, then `a` is `c` */ declare function findTerms(n: number, nn: number, d: number, a: number): number[]; /** * * @param num1 The first number * @param num2 The second number * @param num3 The third number * @param returnSimplified Return the simplified formula of `Tn = dn+c` rather than `Tn = a + (n - 1) * d` */ declare function findNthTerm(num1: number, num2: number, num3: number, returnSimplified?: boolean): { a: number; d: number; formula: string; } | { c: number; d: number; formula: string; }; declare const _default: { findTerm: typeof findTerm; findTerms: typeof findTerms; findNthTerm: typeof findNthTerm; }; export default _default;