@icgio/icg-utils 1.9.4 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/utils.js +3 -1
  2. package/package.json +1 -1
package/lib/utils.js CHANGED
@@ -842,7 +842,9 @@ module.exports.sort_keys = (dict) => {
842
842
  return _.fromPairs(_.sortBy(_.toPairs(dict), (e) => e[0]))
843
843
  }
844
844
 
845
- module.exports.random_normal_range = (mean, std_dev, min, max) => {
845
+ module.exports.random_normal_range = (mean, std_dev, a, b) => {
846
+ let min = Math.min(a, b)
847
+ let max = Math.max(a, b)
846
848
  let u = 1 - Math.random() // [0,1) -> (0,1]
847
849
  let v = Math.random()
848
850
  let z = Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v) // Box-Muller Transform
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {