jandom

Crates.iojandom
lib.rsjandom
version0.3.4
sourcesrc
created_at2022-01-19 16:33:22.251634
updated_at2022-07-27 19:01:03.689254
descriptionPort of java.util.Random
homepage
repositoryhttps://github.com/kallekankaanpaa/jandom
max_upload_size
id516837
size303,916
Kalle Kankaanpää (kallekankaanpaa)

documentation

README

jandom

A port of Java java.util.Random to Rust.

The implementation follows the public API of Java 17 Random. The method signatures have been changed to be more rusty, for example, nextInt -> next_i32, nextDouble -> next_f64, nextGaussian -> next_gaussian, etc. Jandom differs from other java Random implementations by having true feature parity, where even the next_gaussian method returns same values as the Java equivalent.

Jandom makes use of atomics and Mutex to be thread safe by default.

Example usages can be found in the examples directory.

Contributing

If you find any discrepencies between this and the Java implementation, please file a Issue.

Licensing

The code has been licensed under both MIT and Apache 2.0 to follow the Rust API guidelines.

Commit count: 37

cargo fmt