MathCeil

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shank

    MathCeil

    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=JavaSc ript RUNAT=Server NAME="UC_CARTII ">
    function MathCeil(num) {
    return Math.ceil(num)
    }
    </SCRIPT>


  • Janwillem Borleffs

    #2
    Re: MathCeil


    "shank" <shank@tampabay .rr.com> schreef in bericht
    news:Cuypb.1442 87$ox6.2031385@ twister.tampaba y.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



    Comment

    Working...