Rank: Newbie
Groups: Registered
Joined: 23/05/2017(UTC) Posts: 1 Location: Texas
|
Thanks for all the work you have put into this software!
I was wondering if you could make a function to round the value up. So round 2.2 up to 3. Or a function to round down or round to nearest 5... etc. Would be helpful when I am calculating the required number of items required and get 2.2 back, I need it to be 3 when I cannot have a partial item.
Thanks!
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Destory I was wondering if you could make a function to round the value up. So round 2.2 up to 3. Or a function to round down or round to nearest 5... etc. Would be helpful when I am calculating the required number of items required and get 2.2 back, I need it to be 3 when I cannot have a partial item.
Thanks! How can maths invent that 2.2 could be/should be 5 ? From the fx menu, scroll down to Ceil and plug your 2.2 in ... = 3 You could probably square the circle for 2.2 => 5
|
|
|
|
Rank: Member Groups: Registered
Joined: 10/10/2012(UTC) Posts: 24
|
Hello Destory, Apart from the Ceil function, you can write your own function for this, i have made an example for you: you can edit the function (extra if loop) if you want it to handle negative numbers differently. ceil_and_roundup_to_5.sm (8kb) downloaded 433 time(s).I hope this helps you. regards, csb Edited by user 24 May 2017 00:14:45(UTC)
| Reason: sorry can't upload image?
|
|
|
|
Rank: Member Groups: Registered
Joined: 10/10/2012(UTC) Posts: 24
|
The image:
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.