Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 650 Bytes

README.md

File metadata and controls

22 lines (14 loc) · 650 Bytes

reversible_random.dart

A "reversible" random number generator package for Dart. It's able to generate the previous random number. Based on linear congruence.

Ported from LovEveRv/reversible-random.js.

一个Dart编写的“可逆”随机数生成器,能够生成前一个随机数。基于线性同余算法。

移植自LovEveRv/reversible-random.js.

Usage

A simple usage example:

import 'package:reversible_random/reversible_random.dart';

main() {
  var rd = new ReversibleRandom();
  print('${rd.next(max: 20)}');
}