1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:30:03 +08:00
SpaceVim/docs/api/data/number.md
2020-09-12 23:09:38 +08:00

805 B

title description
data#number API data#number API provides some basic functions to generate number.

Available APIs >> data#number

Intro

data#number API provides some functions to manipulate a number. Here is an example for using this api:

let s:NUM = SpaceVim#api#import('data#number')
let random_number = s:NUM.random(3, 10)

functions

name description
random() an unbounded random integer number.
random(a) an unbounded random number larger than a.
random(a, b) a random number from [a, a + b - 1].