LL.bindClass(“java.math.BigDecimal”);

LL.bindClass(“java.math.BigDecimal”);

LL.bindClass(“java.math.RoundingMode”);

LL.bindClass(“java.math.MathContext”);

var a =3;

var b = RoundingMode.HALF_UP;

var c = new MathContext(a,b);

var d = new BigDecimal($cpu_total-$cpu_usage);

d.round(c);

i set this code to item’s binding (Label), but only shows “undefined”or”true”,”false”.

why?

]]>
« (Previous Post)
(Next Post) »

5 Commentsto LL.bindClass(“java.math.BigDecimal”);

  1. Anonymous says:

    < ![CDATA[

    Maybe add :


    return d.toString();


    At the end of your binding script? 



    See http://stackoverflow.com/questions/13900204/bigdecimal-to-string

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Benoît de Chezelles Thanks!

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Masaoka Taro​​ it always a negative number


    $cpu_total is not an existing value

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Bruno-Isa LAMOUR-ARNOULD


    Sorry. i must be ashamed…



    $cpu_total is my type error…lol

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Masaoka Taro lol

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *