VOOZH about

URL: https://www.geeksforgeeks.org/ruby/ruby-float-class-value-9/

⇱ Ruby | Float class < value - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Float class < value

Last Updated : 8 Jan, 2020
Float#<() : <() is a Float class method in Ruby which compares two Float values.
Syntax:  Float.<()

Parameter: Float values

Return:  true - if a < b; otherwise false
Code #1 : Example for <() method Output :
Float a < b : false

Float b < c : true

Float a < c : true

Code #2 : Example for <() method Output :
Float a < b : true

Float b < c : false

Float a < c : false
Comment