Skip to content

Commit 6089c8f

Browse files
committed
chore: add comment
1 parent 3f2e4da commit 6089c8f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

dist/js/math.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ const combinationsFromIntervals = (arrA, arrB, arrC) => {
170170
const roundValueToNDecimals = (value, decimals = 3) => {
171171
return parseFloat(value.toFixed(decimals));
172172
};
173+
// See: https://en.wikipedia.org/wiki/Rounding
173174
var RoundingMethod;
174175
(function (RoundingMethod) {
175176
RoundingMethod["Bankers"] = "bankers";

src/js/math.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import mathjs from "mathjs";
33
import _ from "underscore";
44

5-
import { tolerance as TOLERANCE } from "./constants";
5+
import {tolerance as TOLERANCE} from "./constants";
66

77
/**
88
* This module is intended to be used instead of the original mathjs package, hence we need to reexport all original functions and all TS types.
@@ -32,6 +32,7 @@ export type Help = mathjs.Help;
3232
export type MathJsChain = mathjs.MathJsChain;
3333
export type MathJsJson = mathjs.MathJsJson;
3434

35+
3536
/**
3637
* @summary Zero threshold. Numbers below it are put to zero exactly.
3738
* Used to avoid math.js bug in treating zero as X.XXe-16.
@@ -215,6 +216,9 @@ const combinationsFromIntervals = (arrA: number[], arrB: number[], arrC: number[
215216
const roundValueToNDecimals = (value: number, decimals = 3) => {
216217
return parseFloat(value.toFixed(decimals));
217218
};
219+
220+
221+
// See: https://en.wikipedia.org/wiki/Rounding
218222
export enum RoundingMethod {
219223
Bankers = "bankers",
220224
HalfAwayFromZero = "halfAwayFromZero",

0 commit comments

Comments
 (0)