MCPcopy
hub / github.com/Effect-TS/effect / setState

Method setState

packages/effect/src/Utils.ts:603–608  ·  view source on GitHub ↗

* Restore state previously retrieved using `getState()`. * * @since 2.0.0

(state: PCGRandomState)

Source from the content-addressed store, hash-verified

601 * @since 2.0.0
602 */
603 setState(state: PCGRandomState) {
604 this._state[0] = state[0]
605 this._state[1] = state[1]
606 this._state[2] = state[2]
607 this._state[3] = state[3] | 1
608 }
609
610 /**
611 * Get a uniformly distributed 32 bit integer between [0, max).

Callers 3

randomIntegerFunction · 0.95
randomIntegerBetweenFunction · 0.95
randomNumberFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected