This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp core library.randomnumbergenerator
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-core-library > RandomNumberGenerator
This is the default implementation of IRandomNumberGenerator that simply calls Math.random().
Signature:
export default class RandomNumberGenerator implements IRandomNumberGenerator
Implements: IRandomNumberGenerator
Constructor | Modifiers | Description |
---|---|---|
(constructor)(serviceScope) | Constructs a new instance of the RandomNumberGenerator class |
Property | Modifiers | Type | Description |
---|---|---|---|
serviceKey | static |
ServiceKey<IRandomNumberGenerator> | The service key for IRandomNumberGenerator. |
Method | Modifiers | Description |
---|---|---|
generate() | Returns a pseudorandom number between 0 (inclusive) and 1 (exclusive), following the contract of Math.random(). |