{"id":13734352,"url":"https://github.com/not-fl3/quad-rand","last_synced_at":"2025-04-05T16:06:10.142Z","repository":{"id":53504084,"uuid":"248274093","full_name":"not-fl3/quad-rand","owner":"not-fl3","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-03T15:59:43.000Z","size":16,"stargazers_count":14,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T15:05:01.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/not-fl3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-18T15:44:21.000Z","updated_at":"2025-03-03T15:59:47.000Z","dependencies_parsed_at":"2024-09-14T01:46:11.597Z","dependency_job_id":null,"html_url":"https://github.com/not-fl3/quad-rand","commit_stats":{"total_commits":9,"total_committers":4,"mean_commits":2.25,"dds":"0.33333333333333337","last_synced_commit":"d1fdee3df01991f9f11d3bbb8ac58b89807e5c71"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-fl3%2Fquad-rand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-fl3%2Fquad-rand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-fl3%2Fquad-rand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-fl3%2Fquad-rand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/not-fl3","download_url":"https://codeload.github.com/not-fl3/quad-rand/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361636,"owners_count":20926643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:00:54.944Z","updated_at":"2025-04-05T16:06:10.111Z","avatar_url":"https://github.com/not-fl3.png","language":"Rust","funding_links":[],"categories":["Libraries"],"sub_categories":["Libraries: Other"],"readme":"# quad-rand\n\n[![Crates.io version](https://img.shields.io/crates/v/quad-rand.svg)](https://crates.io/crates/quad-rand)\n[![Documentation on docs.rs](https://docs.rs/quad-rand/badge.svg)](https://docs.rs/quad-rand)\n\n`quad-rand` implements the [SplitMix](https://doi.org/10.1145/2660193.2660195) pseudo-random number generator in a thread-safe manner.\n\nCompatible with wasm and also no-std compatible.\n\nBasic usage, no dependencies involved:\n```rust\nuse quad_rand as qrand;\n\n// seed random\nqrand::srand(12345);\n\n// get random number from 0 to u32::MAX\nlet x = qrand::rand();\n\n// get random number from given range\nlet x = qrand::gen_range(0., 1.);\nassert!(x \u003e= 0. \u0026\u0026 x \u003c 1.);\n\n// gen_range works for most of standard number types\nlet x: u8 = qrand::gen_range(64, 128);\nassert!(x \u003e= 64 \u0026\u0026 x \u003c 128);\n```\n\nOptional compatibility layer with `rand` crate:\n\n```rust\nuse quad_rand::compat::QuadRand;\nuse rand::seq::SliceRandom;\n\nlet mut vec = vec![1, 2, 3, 4, 5, 6];\n\n// QuadRand is rand::RngCore implementation, allowing to use all the cool stuff from rand\nvec.shuffle(\u0026mut QuadRand);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnot-fl3%2Fquad-rand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnot-fl3%2Fquad-rand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnot-fl3%2Fquad-rand/lists"}