ruby - How to check if a value is included between two other values? -


i'm trying express condition this:

if 33.75 < degree <= 56.25   # code end 

but ruby gives error:

undefined method `<=' true:trueclass 

i'm guessing 1 way like:

if 33.75 < degree , degree <= 56.25   # code end 

but there no another, easier way?

ruby has between?:

if value.between?(lower, higher)  

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -