49 return uint32_t(x_ >> 17);
77 return double(this->
get_int32()) / 0x80000000;
85 return (
float)this->
get_int32() / 0x80000000;
93 for (
int i = values.
size() - 1;
i >= 2;
i--) {
96 std::swap(values[
i], values[j]);
109 if (rand1 + rand2 > 1.0f) {
110 rand1 = 1.0f - rand1;
111 rand2 = 1.0f - rand2;
114 return float3(rand1, rand2, 1.0f - rand1 - rand2);
145 constexpr uint64_t multiplier = 0x5DEECE66Dll;
149 x_ = (multiplier * x_ + addend) &
mask;
ATTR_WARN_UNUSED_RESULT const BMVert * v2
unsigned long long int uint64_t
constexpr int64_t size() const
void get_bytes(MutableSpan< char > r_bytes)
int round_probabilistic(float x)
RandomNumberGenerator(uint32_t seed=0)
float3 get_barycentric_coordinates()
void seed_random(uint32_t seed)
float3 get_triangle_sample_3d(float3 v1, float3 v2, float3 v3)
void shuffle(MutableSpan< T > values)
float2 get_triangle_sample(float2 v1, float2 v2, float2 v3)
int32_t get_int32(int32_t max_exclusive)
static RandomNumberGenerator from_random_seed()
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
VecBase< float, 2 > float2
VecBase< float, 3 > float3