function to round up a float number to next point five like 3.3 to 3.5, 3.8 to 4
Mohammed Samgan Khan

Mohammed Samgan Khan @msamgan

About: Love to code with a DRY KISS

Location:
USA
Joined:
Apr 23, 2019

function to round up a float number to next point five like 3.3 to 3.5, 3.8 to 4

Publish Date: Jul 26 '22
4 0

If you are from the shipping industry you face this problem a lot of time where you charge per 0.5 kg. In this kind of case, you need to make the weight from float to round up.

here is a php function to achieve that.

Comments 0 total

    Add comment