{"id":13750647,"url":"https://github.com/matsumotory/mruby-tinymt","last_synced_at":"2025-07-29T10:37:23.641Z","repository":{"id":140250816,"uuid":"9005870","full_name":"matsumotory/mruby-tinymt","owner":"matsumotory","description":"rand() and srand() method with TinyMT","archived":false,"fork":false,"pushed_at":"2015-06-25T10:56:34.000Z","size":168,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T18:16:57.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/matsumotory.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}},"created_at":"2013-03-25T12:45:44.000Z","updated_at":"2022-11-09T06:14:36.000Z","dependencies_parsed_at":"2023-03-12T23:26:28.364Z","dependency_job_id":null,"html_url":"https://github.com/matsumotory/mruby-tinymt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-tinymt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-tinymt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-tinymt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-tinymt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsumotory","download_url":"https://codeload.github.com/matsumotory/mruby-tinymt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245045542,"owners_count":20552055,"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-03T08:00:43.436Z","updated_at":"2025-03-23T02:22:44.144Z","avatar_url":"https://github.com/matsumotory.png","language":"C","readme":"# rand and srand method with TinyMT \nrand and srand method with [Tiny Mersenne Twister](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/index.html)\n\n## install by mrbgems\n - add conf.gem line to `build_config.rb`\n```ruby\nMRuby::Build.new do |conf|\n\n    # ... (snip) ...\n\n    conf.gem :git =\u003e 'https://github.com/matsumoto-r/mruby-tinymt.git'\nend\n```\n\n## example\n\n```ruby\n\n# generate parameter from tinymt32dc\ntmt = TinyMT.new(0xf50a1d49, 0xffa8ffeb, 0x0bf2bfff)\n\ntmt.srand(5)\np tmt.rand()\ntmt.srand(5)\np tmt.rand()\ntmt.srand(10)\np tmt.rand()\n\n5.times do |i|\n  p \"---\" + i.to_s + \"---\"\n  tmt.srand\n  p tmt.rand\n  p tmt.rand(0)\n  p tmt.rand(25)\n  p tmt.rand(50)\n  p tmt.rand(75)\n  p tmt.rand(100)\nend\n```\n\n# License\nunder the MIT License:\n\n* http://www.opensource.org/licenses/mit-license.php\n\ntinymt32.{c.h} under the BSD New License:\n\n* http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/LICENSE.txt\n","funding_links":[],"categories":["System"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmruby-tinymt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsumotory%2Fmruby-tinymt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmruby-tinymt/lists"}