@mathigon/fermat
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -7,3 +7,3 @@ /** Checks if two numbers are nearly equals. */ | ||
/** Returns the sign of a number x, as +1, 0 or –1. */ | ||
export declare function sign(value: number, t?: number): 1 | 0 | -1; | ||
export declare function sign(value: number, t?: number): 0 | 1 | -1; | ||
/** | ||
@@ -10,0 +10,0 @@ * Converts a number to a clean string, by rounding, adding power suffixes, and |
@@ -81,3 +81,3 @@ "use strict"; | ||
function isInteger(x, t = PRECISION) { | ||
return nearlyEquals(x % 1, 0, t); | ||
return nearlyEquals(x, Math.round(x), t); | ||
} | ||
@@ -84,0 +84,0 @@ function isBetween(value, a, b, t = PRECISION) { |
@@ -15,3 +15,3 @@ var __defProp = Object.defineProperty; | ||
function isInteger(x, t = PRECISION) { | ||
return nearlyEquals(x % 1, 0, t); | ||
return nearlyEquals(x, Math.round(x), t); | ||
} | ||
@@ -18,0 +18,0 @@ function isBetween(value, a, b, t = PRECISION) { |
@@ -15,3 +15,3 @@ /** Randomly shuffles the elements in an array a. */ | ||
/** Generates a Bernoulli random variable. */ | ||
export declare function bernoulli(p?: number): 1 | 0; | ||
export declare function bernoulli(p?: number): 0 | 1; | ||
/** Generates a Binomial random variable. */ | ||
@@ -18,0 +18,0 @@ export declare function binomial(n?: number, p?: number): number; |
{ | ||
"name": "@mathigon/fermat", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"license": "MIT", | ||
@@ -38,10 +38,10 @@ "homepage": "https://mathigon.io/fermat", | ||
"dependencies": { | ||
"@mathigon/core": "1.1.6" | ||
"@mathigon/core": "1.1.7" | ||
}, | ||
"devDependencies": { | ||
"@types/tape": "4.13.2", | ||
"@typescript-eslint/eslint-plugin": "5.54.0", | ||
"@typescript-eslint/parser": "5.54.0", | ||
"esbuild": "0.17.10", | ||
"eslint": "8.35.0", | ||
"@types/tape": "4.13.4", | ||
"@typescript-eslint/eslint-plugin": "5.57.1", | ||
"@typescript-eslint/parser": "5.57.1", | ||
"esbuild": "0.17.15", | ||
"eslint": "8.37.0", | ||
"eslint-plugin-import": "2.27.5", | ||
@@ -51,4 +51,4 @@ "tape": "5.6.3", | ||
"tslib": "2.5.0", | ||
"typescript": "4.9.5" | ||
"typescript": "5.0.3" | ||
} | ||
} |
@@ -21,3 +21,3 @@ // ============================================================================ | ||
export function isInteger(x: number, t = PRECISION) { | ||
return nearlyEquals(x % 1, 0, t); | ||
return nearlyEquals(x, Math.round(x), t); | ||
} | ||
@@ -24,0 +24,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
299425
+ Added@mathigon/core@1.1.7(transitive)
- Removed@mathigon/core@1.1.6(transitive)
Updated@mathigon/core@1.1.7