Skip to content

A port of Java java.util.Random to Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kallekankaanpaa/jandom

Repository files navigation

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.

About

A port of Java java.util.Random to Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks