warp.sample_unit_cube#
- warp.sample_unit_cube(state: uint32) vec3f#
Kernel
Python
Uniformly sample a point in the unit cube
[-0.5, 0.5)^3, centered at the origin.Returns a
vec3. In a kernel, advancesstatein place; called from the Python scope, it does not modifystate, so repeated calls with the samestatereturn the same point (seerand_init()).