Javascript: Cast Math.sqrt to int? -


I searched through Google (I probably did not seem quite difficult) but I do not have to change the monastery Sqrt in an int.

I want to use Math.sqrt for loop for and i think i need it as an int, but i can not find it How do I put the result in an integer, how can I do this?

I tried something like this:

  (int) Math.sqrt (num);  

But that does not work.

Thank you in advance :)

Based on the needs of your specific goals < Use the code> Mathematics field , Math.ceil , or Math.floor .

"Calculator, mathematics from mathematics for rounding numbers. Cycle and Math. It is better, and for a desired result which can be expressed as 32 bits, below Described may also be appropriate. "

-


Comments