Hello everyone,
I'm having a difficult time figuring this problem out.
I'm trying to round up and down numbers depending on their decimal value.
Basically
as an example:
1.24 returns 1.0
1.25 returns 1.5
3.8 returns 4.0
2.65 returns 3.0
2.64 returns 2.5
and so on...
Thank you in advance
I'm having a difficult time figuring this problem out.
I'm trying to round up and down numbers depending on their decimal value.
Basically
- if decimal is equal/over .65, then round up to the next whole number
- if decimal is between 0.25 and .65 then enter 0.5
- and finally if decimal is smaller than 0.25 then round it down to the previous whole number.
as an example:
1.24 returns 1.0
1.25 returns 1.5
3.8 returns 4.0
2.65 returns 3.0
2.64 returns 2.5
and so on...
Thank you in advance