1.0.0 • Published 7 years ago

blu-math v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

BLU-Math

Math supplements and stuff I guess.

Fixes some problems that happen when performing math stuff?

Usage

Initialization:

const BluMath = require('blu-math');

Adding numbers:

BluMath.add(0.1, 0.2) // 0.3
(0.1 + 0.2) // 0.30000000000000004

Subtracting Numbers:

// The first number is the base. That is the number that will be subtracted.
// The proceeding numbers will subtract from the base.
// This basically means 0.3
BluMath.subtract(0.3, 0.1, 0.1) // 0.1
(0.3 - 0.1 - 0.1) // 0.09999999999999998

Multiplying Numbers:

BluMath.multiply(0.2, 0.1) // 0.02
(0.2 * 0.1) // 0.020000000000000004

Dividing Numbers:

// The first number is the base. That will be the number that will be divided by the proceeding numbers.
// Basically 0.3 / 0.1 / 0.1
BluMath.divide(0.3, 0.1, 0.1) // 30
(0.3 / 0.1 / 0.1) // 29.999999999999993
1.0.0

7 years ago