@syarhei/math-conversion

1.1.3 • Public • Published

Mathematical library

Description:

Adjust array's values so that sum of numbers is equal to integer value.

Example:

import { convertSumToInteger } from "@syarhei/math-conversion";

const sum: number = 1;  // expected sum of all values

let a: number = 1, b: number = 2, c: number = 3;
([a, b, c] = convertSumToInteger(sum, a, b, c));

console.log(a + b + c === sum);  // true

/@syarhei/math-conversion/

    Package Sidebar

    Install

    npm i @syarhei/math-conversion

    Weekly Downloads

    1

    Version

    1.1.3

    License

    ISC

    Unpacked Size

    9.23 kB

    Total Files

    16

    Last publish

    Collaborators

    • syarhei