|
|
|
@ -27,10 +27,10 @@ namespace rng
|
|
|
|
|
return fract(sin(dot(state, vec2)) * 43758.5453);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline frng(double s1, double s2) : state({s1, s2}){}
|
|
|
|
|
inline frng(const std::array<double, 2>& ar) : state(ar){}
|
|
|
|
|
inline frng(std::array<double, 2>&& ar) : state(ar){}
|
|
|
|
|
inline frng(const double (&ar)[2]) : state({ar[0], ar[1]}) {}
|
|
|
|
|
inline constexpr frng(double s1, double s2) : state({s1, s2}){}
|
|
|
|
|
inline constexpr frng(const std::array<double, 2>& ar) : state(ar){}
|
|
|
|
|
inline constexpr frng(std::array<double, 2>&& ar) : state(ar){}
|
|
|
|
|
inline constexpr frng(const double (&ar)[2]) : state({ar[0], ar[1]}) {}
|
|
|
|
|
|
|
|
|
|
inline constexpr double next_double() override { return sample(); }
|
|
|
|
|
inline constexpr float next_float() override { return (float)sample(); }
|
|
|
|
|