Commit f9fd049e authored by Brice Videau's avatar Brice Videau
Browse files

Fix uniform sampling of rng.

parent c7c4e0b3
......@@ -5,6 +5,7 @@ module CCS
attach_function :ccs_rng_get, [:ccs_rng_t, :pointer], :ccs_result_t
attach_function :ccs_rng_min, [:ccs_rng_t, :pointer], :ccs_result_t
attach_function :ccs_rng_max, [:ccs_rng_t, :pointer], :ccs_result_t
attach_function :ccs_rng_uniform, [:ccs_rng_t, :pointer], :ccs_result_t
class Rng < Object
add_property :min, :ulong, :ccs_rng_min, memoize: true
......@@ -40,7 +41,7 @@ module CCS
def uniform
ptr = MemoryPointer::new(:ccs_float_t)
res = CCS.ccs_rng_get(@handle, ptr)
res = CCS.ccs_rng_uniform(@handle, ptr)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment