VOOZH about

URL: https://www.geeksforgeeks.org/ruby/ruby-float-zero-method-with-example/

⇱ Ruby Float zero?() method with example - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby Float zero?() method with example

Last Updated : 7 Jan, 2020
Float#zero() : zero() is a float class method which checks whether the float value is zero.
Syntax: float.zero() Parameter:float value which is to be checked Return: Boolean value return true if value is zero otherwise return false
Example #1: Output :
a is zero : true

b is zero : true

c is zero : false
Example #2: Output :
a is zero : false

b is zero : false
Comment
Article Tags: