0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

floorメソッド

Posted at

はじめに

floorメソッドの存在を知っておくための議事録です。

floorメソッドとは

小数点の切り捨てを行うメソッド。
.to_f(整数を小数にするメソッド)のfもfloorの略と考えられる。
以下使い方。

irb(main):001:0> 3.1.floor
=> 3
irb(main):002:0> 3.9.floor
=> 3
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?