mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
config redirect
This commit is contained in:
17
node_modules/d3-random/src/uniform.js
generated
vendored
Normal file
17
node_modules/d3-random/src/uniform.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import defaultSource from "./defaultSource.js";
|
||||
|
||||
export default (function sourceRandomUniform(source) {
|
||||
function randomUniform(min, max) {
|
||||
min = min == null ? 0 : +min;
|
||||
max = max == null ? 1 : +max;
|
||||
if (arguments.length === 1) max = min, min = 0;
|
||||
else max -= min;
|
||||
return function() {
|
||||
return source() * max + min;
|
||||
};
|
||||
}
|
||||
|
||||
randomUniform.source = sourceRandomUniform;
|
||||
|
||||
return randomUniform;
|
||||
})(defaultSource);
|
||||
Reference in New Issue
Block a user