Skip to content
Reference > Methods

roundUp(value)

Definition

Long roundUp(Number value)

Description

Returns the closest Long that rounds up the number.

Parameter Definition

Name Type Description
value Number Value to round up

Examples

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