Method: PropCheck::Generators.nonzero_float
- Defined in:
- lib/prop_check/generators.rb
.nonzero_float ⇒ Object
Generates any nonzero floating-point number. Will generate special floats (except NaN) from time to time. c.f. #float
240 241 242 |
# File 'lib/prop_check/generators.rb', line 240 def nonzero_float float.where { |val| val != 0.0 && val } end |