11#ifndef INCGUARD_MGL_RANDOM_H_1626922980
12#define INCGUARD_MGL_RANDOM_H_1626922980
39 constexpr uint32_t
Get() noexcept
41 _seed = _seed ^ (_seed << 13);
42 _seed = _seed ^ (_seed >> 17);
43 _seed = _seed ^ (_seed << 5);
56 return static_cast<float>(
static_cast<double>(
Get()) /
static_cast<double>(0xFFFFFFFF));
65 constexpr uint32_t
GetSeed() const noexcept
76 constexpr void SetSeed(uint32_t seed)
noexcept
XorShift乱数ジェネレータ
Definition mgl_random_xorshift.h:20
constexpr XorShift(uint32_t seed=0) noexcept
コンストラクタ
Definition mgl_random_xorshift.h:28
constexpr uint32_t GetSeed() const noexcept
種の取得
Definition mgl_random_xorshift.h:65
constexpr float GetFloat() noexcept
乱数の取得(float版)
Definition mgl_random_xorshift.h:54
constexpr void SetSeed(uint32_t seed) noexcept
種の設定
Definition mgl_random_xorshift.h:76
constexpr uint32_t Get() noexcept
乱数の取得
Definition mgl_random_xorshift.h:39