Facebook
From Silly Cockroach, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 178
  1. document.write(Math.abs(-4)); //abs wartość bezwzgledna
  2. document.write("<br>");
  3.  
  4. document.write(Math.ceil(4.01)); //ceil zaokragla do gory
  5. document.write("<br>");
  6.  
  7. document.write(Math.floor(4.99)); //floor zaokragla do dołu
  8. document.write("<br>");
  9.  
  10. document.write(Math.round(6.51)); //round zaokrągla normalnie do 0,49 w doł od 0.50 do góry
  11. document.write("<br>");
  12.  
  13. document.write(Math.max(-2,5));// najwiekszą liczbe pokazuje maksymalną
  14. document.write("<br>");
  15.  
  16. document.write(Math.min(5,-3,-91)); //pokazuje minimalną liczbe
  17. document.write("<br>");
  18.  
  19. document.write(Math.pow(2,3)); //potegowanie
  20. document.write("<br>");
  21.  
  22. document.write(Math.sqrt(25)); //pierwiastek
  23. document.write("<br>");