UNPKG

node-opcua-basic-types

Version:

pure nodejs OPCUA SDK - module basic-types

16 lines (14 loc) 408 B
/*** * @module node-opcua-basic-types */ /** * return a random integer value in the range of min inclusive and max exclusive * @param min * @param max * @return {*} * @private */ export function getRandomInt(min: number, max: number): number { // note : Math.random() returns a random number between 0 (inclusive) and 1 (exclusive): return Math.floor(Math.random() * (max - min)) + min; }