Module: ClassHDL::RandomNum
Instance Method Summary collapse
Instance Method Details
#precent_false ⇒ Object
8 9 10 |
# File 'lib/tdl/class_hdl/hdl_random.rb', line 8 def precent_false return "($urandom_range(1,100) > #{self.to_s})".to_nq end |
#precent_true ⇒ Object
4 5 6 |
# File 'lib/tdl/class_hdl/hdl_random.rb', line 4 def precent_true return "($urandom_range(0,99) <= #{self.to_s})".to_nq end |