2023-08-01 04:45:59 +08:00
|
|
|
[[esql-floor]]
|
|
|
|
=== `FLOOR`
|
2023-08-28 18:31:56 +08:00
|
|
|
[.text-center]
|
|
|
|
image::signature/floor.svg[]
|
|
|
|
|
2023-08-01 04:45:59 +08:00
|
|
|
Round a number down to the nearest integer.
|
|
|
|
|
|
|
|
[source.merge.styled,esql]
|
|
|
|
----
|
|
|
|
include::{esql-specs}/math.csv-spec[tag=floor]
|
|
|
|
----
|
|
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|
|
|===
|
|
|
|
include::{esql-specs}/math.csv-spec[tag=floor-result]
|
|
|
|
|===
|
|
|
|
|
2023-08-28 18:31:56 +08:00
|
|
|
NOTE: This is a noop for `long` (including unsigned) and `integer`.
|
|
|
|
For `double` this picks the the closest `double` value to the integer ala
|
2023-08-01 04:45:59 +08:00
|
|
|
{javadoc}/java.base/java/lang/Math.html#floor(double)[Math.floor].
|
2023-08-28 18:31:56 +08:00
|
|
|
|
|
|
|
Supported types:
|
|
|
|
|
|
|
|
include::types/floor.asciidoc[]
|