cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal value converted to next number(int)

SOLVED
Occasional Contributor

Decimal value converted to next number(int)

Decimal value converted to next number(int)

Example 

Given decimal value is 3.0000 = repsult should ." 3"

Given decimal value is 3.30000 = repsult should ." 4"

Given decimal value is 3.10000 = repsult should ." 4"

Given decimal value is 3.5555= repsult should ." 4"

Given decimal value is 3.9999 = repsult should ." 4"

Please provide best solution from Groovy script 

Thanks...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: Decimal value converted to next number(int)

Hello,
You can use Math.ceil() to round off your value in higher side.

First, you need to apply Math.ceil() on your decimal pointed value and then you can convert it into an integer so that you can get value in an integer

1 REPLY 1
Highlighted
Occasional Contributor

Re: Decimal value converted to next number(int)

Hello,
You can use Math.ceil() to round off your value in higher side.

First, you need to apply Math.ceil() on your decimal pointed value and then you can convert it into an integer so that you can get value in an integer

New Here?
Join us and watch the welcome video:
Join the exciting event
SeptemberHubBub
Join the September Hub-bub to show off, learn and win