Connecting Tech Pros Worldwide Forums | Help | Site Map

MathCeil

shank
Guest
 
Posts: n/a
#1: Jul 20 '05
I have the following code in a shopping cart.
1) What is MathCeil used for ? Not having luck searching for it. I'm
guessing it's used to return a number.
2) Can this code be modified to return a number that is always rounded UP?
i.e. 1.1 lbs. = 2 lbs.
thanks

<SCRIPT LANGUAGE=JavaScript RUNAT=Server NAME="UC_CARTII">
function MathCeil(num) {
return Math.ceil(num)
}
</SCRIPT>



Janwillem Borleffs
Guest
 
Posts: n/a
#2: Jul 20 '05

re: MathCeil



"shank" <shank@tampabay.rr.com> schreef in bericht
news:Cuypb.144287$ox6.2031385@twister.tampabay.rr. com...[color=blue]
> I have the following code in a shopping cart.
> 1) What is MathCeil used for ? Not having luck searching for it. I'm
> guessing it's used to return a number.
> 2) Can this code be modified to return a number that is always rounded UP?
> i.e. 1.1 lbs. = 2 lbs.
> thanks
>[/color]

1) Rounding numbers UP through the Math.ceil method (e.g. 1.1 becomes 2)
2) See answer # 1


JW



Closed Thread