OWL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
owl::common::LCG< N > Struct Template Reference

#include <random.h>

Public Member Functions

__both__ LCG (unsigned int val0, unsigned int val1)
 
__both__ LCG (const vec2i &seed)
 
__both__ LCG (const vec2ui &seed)
 
__both__ void init (unsigned int val0, unsigned int val1)
 
__both__ float operator() ()
 

Public Attributes

uint32_t state
 

Detailed Description

template<unsigned int N = 4>
struct owl::common::LCG< N >

simple 24-bit linear congruence generator

Member Function Documentation

◆ operator()()

template<unsigned int N = 4>
__both__ float owl::common::LCG< N >::operator() ( )
inline

Generate random unsigned int in [0, 2^24), then use that to generate random float in [0.f,1.f)


The documentation for this struct was generated from the following file: