Skip to content
Reference > Methods

roundDown(value)

Definition

Long roundDown(Number value)

Description

Returns the closest Long that rounds the number down.

Parameter Definition

Name Type Description
value Number Value to round down

Examples

1
2
3
4
5
6
7
8
Long r1 = roundDown(32.5D); // r1 == 32
Long r2 = roundDown(-32.5D); // r2 == -33
Long r3 = roundDown(32.2D); // r3 == 32
Long r4 = roundDown(-32.2D); // r4 == -33
Long r5 = roundDown(32.8D); // r5 == 32
Long r6 = roundDown(-32.8D); // r6 == -33
Long r7 = roundDown(14); // r7 == 14
Long r8 = roundDown(-14); // r8 == -14