Contact Us 1-800-596-4880

floor

floor(Number): Number

Rounds a number down to the nearest whole number.

Parameters

Name Description

number

The number to evaluate.

Example

This example rounds numbers down to the nearest whole numbers. Notice that 1.5 rounds down to 1.

Source

%dw 2.0
output application/json
---
[ floor(1.5), floor(2.2), floor(3) ]

Output

[ 1, 2, 3]