# Floor スクリプトおよびチャート関数

Floor()は、step (offset によりシフト) に最も近い倍数に数値を切下げます。

入力された数値を切り上げる ceil 関数と比較します。

構文:

Floor(x[, step[, offset]])

戻り値データ型： 数値

引数：

引数

| 引数 | 説明 |
| --- | --- |
| x | 数値を入力します。 |
| step | 間隔は増分です。既定値は 1 です。 |
| offset | ステップ間隔の基準を定義します。デフォルト値は0です。 |

例と結果:

例と結果

| 例 | 結果 |
| --- | --- |
| `Floor(2.4)` | 2 を返します<br><br>In this example, the size of the step is 1 and the base of the step interval is 0.<br><br>The intervals are ...0 &lt;= x &lt;1, 1 &lt;= x &lt; 2, 2&lt;= x &lt;3, 3&lt;= x &lt;4.... |
| `Floor(4.2)` | 4 を返します |
| `Floor(3.88 ,0.1)` | 3.8 を返します<br><br>この例では、間隔の大きさは 0.1、ステップ間隔の基準は 0 となっています。<br><br>間隔は ... 3.7 &lt;= x &lt; 3.8, 3.8 &lt;= x &lt; 3.9, 3.9 &lt;= x &lt; 4.0... です |
| `Floor(3.88 ,5)` | 0 を返します |
| `Floor(1.1 ,1)` | 1 を返します |
| `Floor(1.1 ,1,0.5)` | 0.5 を返します<br><br>この例では、ステップの大きさは 1、オフセットは 0.5 となっています。つまり、ステップ間隔の基準は 0 ではなく、0.5 です。<br><br>間隔は ...0.5 &lt;= x &lt;1.5, 1.5 &lt;= x &lt; 2.5, 2.5&lt;= x &lt;3.5,... です |

## 詳細を見る

* [Frac スクリプトおよびチャート関数](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/frac.htm)
* [Ceil スクリプトおよびチャート関数](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/ceil.htm)