Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

glsx / gl_tape

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 3
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • gl_tape
  • uview-ui
  • libs
  • function
  • random.js
  • 前端's avatar
    init · 3a370151
    前端 committed Apr 07, 2024
    3a370151
random.js 196 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10
function random(min, max) {
	if (min >= 0 && max > 0 && max >= min) {
		let gab = max - min + 1;
		return Math.floor(Math.random() * gab + min);
	} else {
		return 0;
	}
}

export default random;