Rounds $double-var down to the next whole number.
If the value of $string-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.
Signatures
xf:floor(xs:double? $double-var) —> xs:double?
Arguments
|
|
|
xs:double? |
$double-var |
Represents the double to round down. |
Returns
Returns a double equal to $double-var rounded down to the next whole number.
Examples
|
Generates This Result . . . |
<r>{xf:floor(xs:double("11.9"))}</r> |
<r>11.0</r> |
<r>{xf:floor(xs:double("11.5"))}</r> |
<r>11.0</r> |
<r>{xf:floor(xs:double("11.1"))}</r> |
<r>11.0</r> |
<r>{xf:floor(xs:double("-11.9"))}</r> |
<r>-12.0</r> |
<r>{xf:floor(xs:double("-11.5"))}</r> |
<r>-12.0</r> |
<r>{xf:floor(xs:double("-11.1"))}</r> |
<r>-12.0</r> |
Related Topics
W3C floor function description.