[go: up one dir, main page]

randomize 2.0.0

A dead simple to use randomization library for rust.
//! A dead simple to use randomization library for rust.
//!
//! Compiles and works on the GBA.
//!
//! # NOT FOR CRYPTOGRAPHIC PURPOSES.
//!
//! The crate is specific to my personal needs for building games and such. I
//! don't want to, or try to, cover all use cases. If you need a highly general
//! crate for randomization you should use the
//! [rand](https://crates.io/crates/rand) crate, which is the "official" way to
//! do randomization in rust.

#![cfg_attr(not(target_feature = "std_stuff"), no_std)]
#![feature(const_int_wrapping)]
#![feature(const_int_rotate)]
#![feature(const_int_ops)]
#![feature(const_fn)]
#![feature(const_let)]
#![allow(clippy::cast_lossless)]
#![allow(clippy::unreadable_literal)]
#![deny(clippy::float_arithmetic)]
#![forbid(missing_debug_implementations)]
#![warn(missing_docs)]

#[cfg(target_feature = "serde_support")]
extern crate serde;
#[cfg(target_feature = "serde_support")]
#[macro_use]
extern crate serde_derive;

pub(crate) use core::num::{NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8};

#[cfg(target_feature = "std_stuff")]
pub mod std_stuff;

pub mod lcg;
pub(crate) use self::lcg::*;

pub mod pcg;
pub use self::pcg::*;

pub mod mcg;
pub use self::mcg::*;

pub mod noncg;

// bounded results

// we must also allow pre-computed bounds to be cached

// extension arrays

// jsf32?